Cross component filtering-based image coding apparatus and method

ABSTRACT

According to one embodiment of the present document, a cross component adaptive loop filtering (CCALF) process may be performed. The CCALF process can enhance the filtering performance for chroma components and improve the subjective/objective image quality of a picture.

CROSS-REFERENCE TO RELATED APPLICATIONS

Pursuant to 35 U.S.C. § 119(e), this application is a continuation ofInternational Application No. PCT/KR2020/011598, with an internationalfiling date of Aug. 31, 2020, which claims the benefit of U.S.Provisional Patent Application No. 62/893,758, filed on Aug. 29, 2019,the contents of which are hereby incorporated by reference herein intheir entirety.

BACKGROUND OF THE DISCLOSURE Field of the Disclosure

The present disclosure relates to a cross-component filtering-basedimage coding apparatus and method.

Related Art

Recently, demand for high-resolution, high-quality image/video such as4K or 8K or higher ultra high definition (UHD) image/video has increasedin various fields. As image/video data has high resolution and highquality, the amount of information or bits to be transmitted increasesrelative to the existing image/video data, and thus, transmitting imagedata using a medium such as an existing wired/wireless broadband line oran existing storage medium or storing image/video data using existingstorage medium increase transmission cost and storage cost.

In addition, interest and demand for immersive media such as virtualreality (VR) and artificial reality (AR) content or holograms hasrecently increased and broadcasting for image/video is havingcharacteristics different from reality images such as game images hasincreased.

Accordingly, a highly efficient image/video compression technology isrequired to effectively compress, transmit, store, and reproduceinformation of a high-resolution, high-quality image/video havingvarious characteristics as described above.

In addition, there is a discussion for improving compression efficiencyand improving subjective/objective visual quality according to theimplementation of a cross component adaptive loop filtering (CCALF)process.

SUMMARY

The present disclosure provides a method and apparatus for increasingimage/video coding efficiency.

The present disclosure also provides an efficient filtering applicationmethod and apparatus.

The present disclosure also provides an efficient ALF application methodand apparatus.

The present disclosure also provides a filtering process of areconstructed chroma samples which is performed based on reconstructedluma samples.

The present disclosure also provides filtered reconstructed chromasamples which are modified based on reconstructed luma samples.

According to the embodiment of the present disclosure, the informationon whether CCALF is enabled in SPS may be signaled.

The present disclosure also provides information on values ofcross-component filter coefficients which may be derived from ALF data(normal ALF data or CCALF data).

The present disclosure also provides identifier (ID) information of anAPS including ALF data for deriving cross-component filter coefficientswhich may be signaled in a slice.

The present disclosure also provides information on a filter set indexfor CCALF which may be signaled in units of CTU (block).

According to an embodiment of the present document, a video/imagedecoding method performed by a decoding apparatus is provided.

According to an embodiment of the present document, a decoding apparatusfor performing video/image decoding is provided.

According to an embodiment of the present document, a video/imageencoding method performed by an encoding apparatus is provided.

According to an embodiment of the present document, an encodingapparatus for performing video/image encoding is provided.

According to one embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded video/imageinformation, generated according to the video/image encoding methoddisclosed in at least one of the embodiments of the present document, isstored.

According to an embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded information orencoded video/image information, causing to perform the video/imagedecoding method disclosed in at least one of the embodiments of thepresent document by the decoding apparatus, is stored.

Advantageous Effects

According to an embodiment of the present disclosure, it is possible toincrease overall image/video compression efficiency.

According to an embodiment of the present disclosure, it is possible toincrease subjective/objective visual quality through efficientfiltering.

According to an embodiment of the present disclosure, it is possible toefficiently perform an ALF process and improve filtering performance.

According to an embodiment of the present disclosure, it is possible tomodify reconstructed chroma samples filtered based on reconstructed lumasamples to improve picture quality and coding accuracy of a chromacomponent of a decoded picture.

According to an embodiment of the present disclosure, it is possible toefficiently perform a CCALF process.

According to an embodiment of the present disclosure, it is possible toefficiently signal ALF-related information.

According to an embodiment of the present disclosure, it is possible toefficiently signal CCALF-related information.

According to an embodiment of the present disclosure, it is possible toadaptively apply ALF and/or CCALF in units of pictures, slices, and/orcoding blocks.

According to an embodiment of the present disclosure, when CCALF is usedin an encoding and decoding method and apparatus for a still image ormoving image, it is possible to improve filter coefficients for CCALFand an on/off transmission method in units of blocks or CTUs to increasecoding efficiency.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically shows an example of a video/image coding system towhich embodiments of the present disclosure may be applied.

FIG. 2 is a view schematically illustrating the configuration of avideo/image encoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 3 is a view schematically illustrating the configuration of avideo/image decoding apparatus to which embodiments of the presentdisclosure may be applied.

FIG. 4 exemplarily shows a hierarchical architecture for a codedvideo/image.

FIG. 5 is a flowchart for describing an intra prediction-based blockreconstruction method in a decoding apparatus.

FIG. 6 illustrates an intra predictor in a decoding apparatus.

FIG. 7 is a flowchart for describing an inter prediction-based blockreconstruction method in an encoding apparatus.

FIG. 8 is a flowchart for describing an inter prediction-based blockreconstruction method in a decoding apparatus.

FIG. 9 illustrates an inter predictor in the decoding apparatus.

FIG. 10 is a diagram illustrating an example of a shape of an ALFfilter.

FIG. 11 is a diagram for describing a virtual boundary applied to afiltering process according to an embodiment of the present disclosure.

FIG. 12 is a diagram illustrating an example of an ALF process using thevirtual boundary according to the embodiment of the present disclosure.

FIG. 13 is a diagram for describing a cross-component adaptive loopfiltering (CC-ALF (CCALF)) process according to an embodiment of thepresent disclosure.

FIGS. 14 and 15 are diagrams schematically illustrating an example of avideo/image encoding method and related components according toembodiment(s) of the present disclosure.

FIGS. 16 and 17 are diagrams schematically illustrating an example of animage/video decoding method and related components according toembodiment(s) of the present disclosure.

FIG. 18 is a diagram illustrating an example of a content streamingsystem to which embodiments disclosed in the present disclosure may beapplied.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

Since the present disclosure may be variously modified and have severalexemplary embodiments, specific exemplary embodiments will beillustrated in the accompanying drawings and be described in detail in adetailed description. However, this is not intended to limit the presentdisclosure to specific embodiments. The terms used in the presentdisclosure are only used to describe specific embodiments, and are notintended to limit the technical idea of the embodiments of the presentdisclosure. Singular forms are intended to include plural forms unlessthe context clearly indicates otherwise. It will be further understoodthat the terms “comprises” or “have” used in this specification, specifythe presence of stated features, steps, operations, components, partsmentioned in this specification, or a combination thereof, but do notpreclude the presence or addition of one or more other features,numerals, steps, operations, components, parts, or a combinationthereof.

Meanwhile, each configuration in the drawings described in the presentdisclosure is illustrated independently for convenience of descriptionregarding different characteristic functions, and does not mean thateach configuration is implemented as separate hardware or separatesoftware. For example, two or more components among each component maybe combined to form one component, or one component may be divided intoa plurality of components. Embodiments in which each configuration isintegrated and/or separated are also included in the scope of thedisclosure of the present disclosure.

This document relates to video/image coding. For example, amethod/embodiment disclosed in this document may be applied to a methoddisclosed in a versatile video coding (VVC) standard. In addition, themethod/embodiment disclosed in this document may be applied to a methoddisclosed in an essential video coding (EVC) standard, AOMedia Video 1(AV1) standard, 2nd generation of audio video coding standard (AVS2), ora next-generation video/image coding standard (e.g., H.267, H.268,etc.).

Various embodiments related to video/image coding are presented in thisdocument, and the embodiments may be combined with each other unlessotherwise stated.

In this document, a video may refer to a series of images over time. Apicture generally refers to the unit representing one image at aparticular time frame, and a slice/tile refers to the unit constitutinga part of the picture in terms of coding. A slice/tile may include oneor more coding tree units (CTUs). One picture may consist of one or moreslices/tiles. A tile is a rectangular region of CTUs within a particulartile column and a particular tile row in a picture. The tile column is arectangular region of CTUs having a height equal to the height of thepicture and a width specified by syntax elements in the pictureparameter setc. The tile row is a rectangular region of CTUs having aheight specified by syntax elements in the picture parameter set and awidth equal to the width of the picture. A tile scan is a specificsequential ordering of CTUs partitioning a picture in which the CTUs areordered consecutively in CTU raster scan in a tile whereas tiles in apicture are ordered consecutively in a raster scan of the tiles of thepicture. A slice includes an integer number of complete tiles or aninteger number of consecutive complete CTU rows within a tile of apicture that may be exclusively contained in a single NAL unit

Meanwhile, one picture may be divided into two or more subpictures. Asubpicture may be an rectangular region of one or more slices within apicture.

A pixel or a pel may mean a smallest unit constituting one picture (orimage). Also, ‘sample’ may be used as a term corresponding to a pixel. Asample may generally represent a pixel or a value of a pixel, and mayrepresent only a pixel/pixel value of a luma component or only apixel/pixel value of a chroma component.

A unit may represent a basic unit of image processing. The unit mayinclude at least one of a specific region of the picture and informationrelated to the region. One unit may include one luma block and twochroma (ex. Cb, cr) blocks. The unit may be used interchangeably withterms such as block or area in some cases. In a general case, an M×Nblock may include samples (or sample arrays) or a set (or array) oftransform coefficients of M columns and N rows. Alternatively, thesample may mean a pixel value in the spatial domain, and when such apixel value is transformed to the frequency domain, it may mean atransform coefficient in the frequency domain.

In the present document, “A or B” may mean “only A”, “only B” or “both Aand B”. In other words, “A or B” in the present document may beinterpreted as “A and/or B”. For example, in the present document, “A,B, or C” means “only A”, “only B”, “only C”, or “any and any combinationof A, B, and C”.

A slash (/) or comma (comma) used in the present document may mean“and/or”. For example, “A/B” may mean “and/or B”. Accordingly, “A/B” maymean “only A”, “only B”, or “both A and B.” For example, “A, B, C” maymean “A, B, or C”.

In the present document, “at least one of A and B” may mean “only A”,“only B”, or “both A and B”. Further, in the present document, theexpression “at least one of A or B” or “at least one of A and/or B” maybe interpreted the same as “at least one of A and B”.

Further, in the present document, “at least one of A, B and C” may mean“only A”, “only B”, “only C”, or “any combination of A, B and C”.Further, “at least one of A, B or C” or “at least one of A, B and/or C”may mean “at least one of A, B and C”.

Further, the parentheses used in the present specification may mean “forexample”. Specifically, in the case that “prediction (intra prediction)”is expressed, it may be indicated that “intra prediction” is proposed asan example of “prediction”. In other words, the term “prediction” in thepresent specification is not limited to “intra prediction”, and it maybe indicated that “intra prediction” is proposed as an example of“prediction”. Further, even in the case that “prediction (i.e., intraprediction)” is expressed, it may be indicated that “intra prediction”is proposed as an example of “prediction”.

In the present specification, technical features individually explainedin one drawing may be individually implemented, or may be simultaneouslyimplemented.

Hereinafter, embodiments of the present disclosure will be described indetail with reference to the accompanying drawings. In addition, likereference numerals are used to indicate like elements throughout thedrawings, and the same descriptions on the like elements may be omitted.

FIG. 1 illustrates an example of a video/image coding system to whichthe disclosure of the present document may be applied.

Referring to FIG. 1, a video/image coding system may include a sourcedevice and a reception device. The source device may transmit encodedvideo/image information or data to the reception device through adigital storage medium or network in the form of a file or streaming.

The source device may include a video source, an encoding apparatus, anda transmitter. The receiving device may include a receiver, a decodingapparatus, and a renderer. The encoding apparatus may be called avideo/image encoding apparatus, and the decoding apparatus may be calleda video/image decoding apparatus. The transmitter may be included in theencoding apparatus. The receiver may be included in the decodingapparatus. The renderer may include a display, and the display may beconfigured as a separate device or an external component.

The video source may acquire video/image through a process of capturing,synthesizing, or generating the video/image. The video source mayinclude a video/image capture device and/or a video/image generatingdevice. The video/image capture device may include, for example, one ormore cameras, video/image archives including previously capturedvideo/images, and the like. The video/image generating device mayinclude, for example, computers, tablets and smartphones, and may(electronically) generate video/images. For example, a virtualvideo/image may be generated through a computer or the like. In thiscase, the video/image capturing process may be replaced by a process ofgenerating related data.

The encoding apparatus may encode input video/image. The encodingapparatus may perform a series of procedures such as prediction,transform, and quantization for compaction and coding efficiency. Theencoded data (encoded video/image information) may be output in the formof a bitstream.

The transmitter may transmit the encoded image/image information or dataoutput in the form of a bitstream to the receiver of the receivingdevice through a digital storage medium or a network in the form of afile or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and thelike. The transmitter may include an element for generating a media filethrough a predetermined file format and may include an element fortransmission through a broadcast/communication network. The receiver mayreceive/extract the bitstream and transmit the received bitstream to thedecoding apparatus.

The decoding apparatus may decode the video/image by performing a seriesof procedures such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding apparatus.

The renderer may render the decoded video/image. The renderedvideo/image may be displayed through the display.

FIG. 2 is a diagram schematically illustrating the configuration of avideo/image encoding apparatus to which the disclosure of the presentdocument may be applied. Hereinafter, what is referred to as the videoencoding apparatus may include an image encoding apparatus.

Referring to FIG. 2, the encoding apparatus 200 may include and beconfigured with an image partitioner 210, a predictor 220, a residualprocessor 230, an entropy encoder 240, an adder 250, a filter 260, and amemory 270. The predictor 220 may include an inter predictor 221 and anintra predictor 222. The residual processor 230 may include atransformer 232, a quantizer 233, a dequantizer 234, and an inversetransformer 235. The residual processor 230 may further include asubtractor 231. The adder 250 may be called a reconstructor orreconstructed block generator. The image partitioner 210, the predictor220, the residual processor 230, the entropy encoder 240, the adder 250,and the filter 260, which have been described above, may be configuredby one or more hardware components (e.g., encoder chipsets orprocessors) according to an embodiment. In addition, the memory 270 mayinclude a decoded picture buffer (DPB), and may also be configured by adigital storage medium. The hardware component may further include thememory 270 as an internal/external component.

The image partitioner 210 may split an input image (or, picture, frame)input to the encoding apparatus 200 into one or more processing units.As an example, the processing unit may be called a coding unit (CU). Inthis case, the coding unit may be recursively split according to aQuad-tree binary-tree ternary-tree (QTBTTT) structure from a coding treeunit (CTU) or the largest coding unit (LCU). For example, one codingunit may be split into a plurality of coding units of a deeper depthbased on a quad-tree structure, a binary-tree structure, and/or aternary-tree structure. In this case, for example, the quad-treestructure is first applied and the binary-tree structure and/or theternary-tree structure may be later applied. Alternatively, thebinary-tree structure may also be first applied. A coding procedureaccording to the present disclosure may be performed based on a finalcoding unit which is not split any more. In this case, based on codingefficiency according to image characteristics or the like, the maximumcoding unit may be directly used as the final coding unit, or asnecessary, the coding unit may be recursively split into coding units ofa deeper depth, such that a coding unit having an optimal size may beused as the final coding unit. Here, the coding procedure may include aprocedure such as prediction, transform, and reconstruction to bedescribed later. As another example, the processing unit may furtherinclude a predictor (PU) or a transform unit (TU). In this case, each ofthe predictor and the transform unit may be split or partitioned fromthe aforementioned final coding unit. The predictor may be a unit ofsample prediction, and the transform unit may be a unit for inducing atransform coefficient and/or a unit for inducing a residual signal fromthe transform coefficient.

The unit may be interchangeably used with the term such as a block or anarea in some cases. Generally, an M×N block may represent samplescomposed of M columns and N rows or a group of transform coefficients.The sample may generally represent a pixel or a value of the pixel, andmay also represent only the pixel/pixel value of a luma component, andalso represent only the pixel/pixel value of a chroma component. Thesample may be used as the term corresponding to a pixel or a pelconfiguring one picture (or image).

The subtractor 231 may generate a residual signal (residual block,residual samples, or residual sample array) by subtracting a predictionsignal (predicted block, prediction samples, or prediction sample array)output from the predictor 220 from an input image signal (originalblock, original samples, or original sample array), and the generatedresidual signal is transmitted to the transformer 232. The predictor 220may perform prediction for a processing target block (hereinafter,referred to as a “current block”), and generate a predicted blockincluding prediction samples for the current block. The predictor 220may determine whether intra prediction or inter prediction is applied ona current block or in a CU unit. As described later in the descriptionof each prediction mode, the predictor may generate various kinds ofinformation related to prediction, such as prediction mode information,and transfer the generated information to the entropy encoder 240. Theinformation on the prediction may be encoded in the entropy encoder 240and output in the form of a bitstream.

The intra predictor 222 may predict a current block with reference tosamples within a current picture. The referenced samples may be locatedneighboring to the current block, or may also be located away from thecurrent block according to the prediction mode. The prediction modes inthe intra prediction may include a plurality of non-directional modesand a plurality of directional modes. The non-directional mode mayinclude, for example, a DC mode or a planar mode. The directional modemay include, for example, 33 directional prediction modes or 65directional prediction modes according to the fine degree of theprediction direction. However, this is illustrative and the directionalprediction modes which are more or less than the above number may beused according to the setting. The intra predictor 222 may alsodetermine the prediction mode applied to the current block using theprediction mode applied to the neighboring block.

The inter predictor 221 may induce a predicted block of the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. At this time, in order to decreasethe amount of motion information transmitted in the inter predictionmode, the motion information may be predicted in units of a block, asub-block, or a sample based on the correlation of the motioninformation between the neighboring block and the current block. Themotion information may include a motion vector and a reference pictureindex. The motion information may further include inter predictiondirection (L0 prediction, L1 prediction, Bi prediction, or the like)information. In the case of the inter prediction, the neighboring blockmay include a spatial neighboring block existing within the currentpicture and a temporal neighboring block existing in the referencepicture. The reference picture including the reference block and thereference picture including the temporal neighboring block may also bethe same as each other, and may also be different from each other. Thetemporal neighboring block may be called the name such as a collocatedreference block, a collocated CU (colCU), or the like, and the referencepicture including the temporal neighboring block may also be called acollocated picture (colPic). For example, the inter predictor 221 mayconfigure a motion information candidate list based on the neighboringblocks, and generate information indicating what candidate is used toderive the motion vector and/or the reference picture index of thecurrent block. The inter prediction may be performed based on variousprediction modes, and for example, in the case of a skip mode and amerge mode, the inter predictor 221 may use the motion information ofthe neighboring block as the motion information of the current block. Inthe case of the skip mode, the residual signal may not be transmittedunlike the merge mode. A motion vector prediction (MVP) mode mayindicate the motion vector of the current block by using the motionvector of the neighboring block as a motion vector predictor, andsignaling a motion vector difference.

The predictor 220 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply both intra prediction and inter prediction.This may be called combined inter and intra prediction (CIIP). Inaddition, the predictor may perform an intra block copy (IBC) forprediction of a block. The intra block copy may be used for contentimage/moving image coding of a game or the like, for example, screencontent coding (SCC). The IBC basically performs prediction in thecurrent picture, but may be performed similarly to inter prediction inthat a reference block is derived in the current picture. That is, theIBC may use at least one of inter prediction techniques described in thepresent document.

The prediction signal generated through the inter predictor 221 and/orthe intra predictor 222 may be used to generate a reconstructed signalor to generate a residual signal. The transformer 232 may generatetransform coefficients by applying a transform technique to the residualsignal. For example, the transform technique may include at least one ofa discrete cosine transform (DCT), a discrete sine transform (DST), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to the transform obtained based on a prediction signalgenerated using all previously reconstructed pixels. In addition, thetransform process may be applied to square pixel blocks having the samesize, or may be applied to blocks having a variable size rather than asquare.

The quantizer 233 may quantize the transform coefficients and transmitthem to the entropy encoder 240, and the entropy encoder 240 may encodethe quantized signal (information on the quantized transformcoefficients) and output a bitstream. The information on the quantizedtransform coefficients may be referred to as residual information. Thequantizer 233 may rearrange block type quantized transform coefficientsinto a one-dimensional vector form based on a coefficient scanningorder, and generate information on the quantized transform coefficientsbased on the quantized transform coefficients in the one-dimensionalvector form. The entropy encoder 240 may perform various encodingmethods such as, for example, exponential Golomb, context-adaptivevariable length coding (CAVLC), context-adaptive binary arithmeticcoding (CABAC), and the like. The entropy encoder 240 may encodeinformation necessary for video/image reconstruction together with orseparately from the quantized transform coefficients (e.g., values ofsyntax elements and the like). Encoded information (e.g., encodedvideo/image information) may be transmitted or stored in the unit of anetwork abstraction layer (NAL) in the form of a bitstream. Thevideo/image information may further include information on variousparameter sets, such as an adaptation parameter set (APS), a pictureparameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. In the present document,information and/or syntax elements being signaled/transmitted to bedescribed later may be encoded through the above-described encodingprocedure, and be included in the bitstream. The bitstream may betransmitted through a network, or may be stored in a digital storagemedium. Here, the network may include a broadcasting network and/or acommunication network, and the digital storage medium may includevarious storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, andthe like. A transmitter (not illustrated) transmitting a signal outputfrom the entropy encoder 240 and/or a storage unit (not illustrated)storing the signal may be configured as an internal/external element ofthe encoding apparatus 200, and alternatively, the transmitter may beincluded in the entropy encoder 240.

The quantized transform coefficients output from the quantizer 233 maybe used to generate a prediction signal. For example, the residualsignal (residual block or residual samples) may be reconstructed byapplying dequantization and inverse transform to the quantized transformcoefficients through the dequantizer 234 and the inverse transformer235. The adder 250 adds the reconstructed residual signal to theprediction signal output from the predictor 220 to generate areconstructed signal (reconstructed picture, reconstructed block,reconstructed samples, or reconstructed sample array). If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock. The generated reconstructed signal may be used for intraprediction of a next processing target block in the current picture, andmay be used for inter prediction of a next picture through filtering asdescribed below.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringa picture encoding and/or reconstruction process.

The filter 260 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter260 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 270, specifically, in a DPB of thememory 270. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset (SAO), an adaptive loopfilter, a bilateral filter, and the like. The filter 260 may generatevarious kinds of information related to the filtering, and transfer thegenerated information to the entropy encoder 290 as described later inthe description of each filtering method. The information related to thefiltering may be encoded by the entropy encoder 290 and output in theform of a bitstream.

The modified reconstructed picture transmitted to the memory 270 may beused as a reference picture in the inter predictor 221. When the interprediction is applied through the encoding apparatus, predictionmismatch between the encoding apparatus 200 and the decoding apparatuscan be avoided and encoding efficiency can be improved.

The DPB of the memory 270 may store the modified reconstructed picturefor use as the reference picture in the inter predictor 221. The memory270 may store motion information of a block from which the motioninformation in the current picture is derived (or encoded) and/or motioninformation of blocks in the picture, having already been reconstructed.The stored motion information may be transferred to the inter predictor221 to be utilized as motion information of the spatial neighboringblock or motion information of the temporal neighboring block. Thememory 270 may store reconstructed samples of reconstructed blocks inthe current picture, and may transfer the reconstructed samples to theintra predictor 222.

FIG. 3 is a diagram for schematically explaining the configuration of avideo/image decoding apparatus to which the disclosure of the presentdocument may be applied.

Referring to FIG. 3, the decoding apparatus 300 may include andconfigured with an entropy decoder 310, a residual processor 320, apredictor 330, an adder 340, a filter 350, and a memory 360. Thepredictor 330 may include an inter predictor 331 and an intra predictor332. The residual processor 320 may include a dequantizer 321 and aninverse transformer 322. The entropy decoder 310, the residual processor320, the predictor 330, the adder 340, and the filter 350, which havebeen described above, may be configured by one or more hardwarecomponents (e.g., decoder chipsets or processors) according to anembodiment. Further, the memory 360 may include a decoded picture buffer(DPB), and may be configured by a digital storage medium. The hardwarecomponent may further include the memory 360 as an internal/externalcomponent.

When the bitstream including the video/image information is input, thedecoding apparatus 300 may reconstruct the image in response to aprocess in which the video/image information is processed in theencoding apparatus illustrated in FIG. 2. For example, the decodingapparatus 300 may derive the units/blocks based on block split-relatedinformation acquired from the bitstream. The decoding apparatus 300 mayperform decoding using the processing unit applied to the encodingapparatus. Therefore, the processing unit for the decoding may be, forexample, a coding unit, and the coding unit may be split according tothe quad-tree structure, the binary-tree structure, and/or theternary-tree structure from the coding tree unit or the maximum codingunit. One or more transform units may be derived from the coding unit.In addition, the reconstructed image signal decoded and output throughthe decoding apparatus 300 may be reproduced through a reproducingapparatus.

The decoding apparatus 300 may receive a signal output from the encodingapparatus of FIG. 2 in the form of a bitstream, and the received signalmay be decoded through the entropy decoder 310. For example, the entropydecoder 310 may parse the bitstream to derive information (e.g.,video/image information) necessary for image reconstruction (or picturereconstruction). The video/image information may further includeinformation on various parameter sets such as an adaptation parameterset (APS), a picture parameter set (PPS), a sequence parameter set(SPS), or a video parameter set (VPS). In addition, the video/imageinformation may further include general constraint information. Thedecoding apparatus may further decode picture based on the informationon the parameter set and/or the general constraint information.Signaled/received information and/or syntax elements described later inthis document may be decoded may decode the decoding procedure andobtained from the bitstream. For example, the entropy decoder 310decodes the information in the bitstream based on a coding method suchas exponential Golomb coding, CAVLC, or CABAC, and output syntaxelements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABACentropy decoding method may receive a bin corresponding to each syntaxelement in the bitstream, determine a context model by using a decodingtarget syntax element information, decoding information of a decodingtarget block or information of a symbol/bin decoded in a previous stage,and perform an arithmetic decoding on the bin by predicting aprobability of occurrence of a bin according to the determined contextmodel, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update thecontext model by using the information of the decoded symbol/bin for acontext model of a next symbol/bin after determining the context model.The information related to the prediction among the information decodedby the entropy decoder 310 may be provided to the predictor 330, andinformation on the residual on which the entropy decoding has beenperformed in the entropy decoder 310, that is, the quantized transformcoefficients and related parameter information, may be input to thedequantizer 321. In addition, information on filtering among informationdecoded by the entropy decoder 310 may be provided to the filter 350.Meanwhile, a receiver (not illustrated) for receiving a signal outputfrom the encoding apparatus may be further configured as aninternal/external element of the decoding apparatus 300, or the receivermay be a constituent element of the entropy decoder 310. Meanwhile, thedecoding apparatus according to the present document may be referred toas a video/image/picture decoding apparatus, and the decoding apparatusmay be classified into an information decoder (video/image/pictureinformation decoder) and a sample decoder (video/image/picture sampledecoder). The information decoder may include the entropy decoder 310,and the sample decoder may include at least one of the dequantizer 321,the inverse transformer 322, the predictor 330, the adder 340, thefilter 350, and the memory 360.

The dequantizer 321 may dequantize the quantized transform coefficientsto output the transform coefficients. The dequantizer 321 may rearrangethe quantized transform coefficients in a two-dimensional block form. Inthis case, the rearrangement may be performed based on a coefficientscan order performed by the encoding apparatus. The dequantizer 321 mayperform dequantization for the quantized transform coefficients using aquantization parameter (e.g., quantization step size information), andacquire the transform coefficients.

The inverse transformer 322 inversely transforms the transformcoefficients to acquire the residual signal (residual block, residualsample array).

The predictor 330 may perform the prediction of the current block, andgenerate a predicted block including the prediction samples of thecurrent block. The predictor may determine whether the intra predictionis applied or the inter prediction is applied to the current block basedon the information about prediction output from the entropy decoder 310,and determine a specific intra/inter prediction mode.

The predictor may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply intra prediction and inter prediction. Thismay be called combined inter and intra prediction (CIIP). In addition,the predictor may perform an intra block copy (IBC) for prediction of ablock. The intra block copy may be used for content image/moving imagecoding of a game or the like, for example, screen content coding (SCC).The IBC basically performs prediction in the current picture, but may beperformed similarly to inter prediction in that a reference block isderived in the current picture. That is, the IBC may use at least one ofinter prediction techniques described in the present document.

The intra predictor 332 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block, or may be located apart fromthe current block according to the prediction mode. In intra prediction,prediction modes may include a plurality of non-directional modes and aplurality of directional modes. The intra predictor 332 may determinethe prediction mode to be applied to the current block by using theprediction mode applied to the neighboring block.

The inter predictor 331 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. In this case, in order to reducethe amount of motion information being transmitted in the interprediction mode, motion information may be predicted in the unit ofblocks, subblocks, or samples based on correlation of motion informationbetween the neighboring block and the current block. The motioninformation may include a motion vector and a reference picture index.The motion information may further include information on interprediction direction (L0 prediction, L1 prediction, Bi prediction, andthe like). In case of inter prediction, the neighboring block mayinclude a spatial neighboring block existing in the current picture anda temporal neighboring block existing in the reference picture. Forexample, the inter predictor 331 may construct a motion informationcandidate list based on neighboring blocks, and derive a motion vectorof the current block and/or a reference picture index based on thereceived candidate selection information. Inter prediction may beperformed based on various prediction modes, and the information on theprediction may include information indicating a mode of inter predictionfor the current block.

The adder 340 may generate a reconstructed signal (reconstructedpicture, reconstructed block, or reconstructed sample array) by addingthe obtained residual signal to the prediction signal (predicted blockor predicted sample array) output from the predictor 330. If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock.

The adder 340 may be called a reconstructor or a reconstructed blockgenerator. The generated reconstructed signal may be used for the intraprediction of a next block to be processed in the current picture, andas described later, may also be output through filtering or may also beused for the inter prediction of a next picture.

Meanwhile, a luma mapping with chroma scaling (LMCS) may also be appliedin the picture decoding process.

The filter 350 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter350 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 360, specifically, in a DPB of thememory 360. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 360may be used as a reference picture in the inter predictor 331. Thememory 360 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture having already beenreconstructed. The stored motion information may be transferred to theinter predictor 331 so as to be utilized as the motion information ofthe spatial neighboring block or the motion information of the temporalneighboring block. The memory 360 may store reconstructed samples ofreconstructed blocks in the current picture, and transfer thereconstructed samples to the intra predictor 332.

In the present specification, the embodiments described in the predictor330, the dequantizer 321, the inverse transformer 322, and the filter350 of the decoding apparatus 300 may also be applied in the same manneror corresponding to the predictor 220, the dequantizer 234, the inversetransformer 235, and the filter 260 of the encoding apparatus 200.

Meanwhile, as described above, in performing video coding, prediction isperformed to improve compression efficiency. Through this, a predictedblock including prediction samples for a current block as a block to becoded (i.e., a coding target block) may be generated. Here, thepredicted block includes prediction samples in a spatial domain (orpixel domain). The predicted block is derived in the same manner in anencoding apparatus and a decoding apparatus, and the encoding apparatusmay signal information (residual information) on residual between theoriginal block and the predicted block, rather than an original samplevalue of an original block, to the decoding apparatus, therebyincreasing image coding efficiency. The decoding apparatus may derive aresidual block including residual samples based on the residualinformation, add the residual block and the predicted block to generatereconstructed blocks including reconstructed samples, and generate areconstructed picture including the reconstructed blocks.

The residual information may be generated through a transform andquantization procedure. For example, the encoding apparatus may derive aresidual block between the original block and the predicted block,perform a transform procedure on residual samples (residual samplearray) included in the residual block to derive transform coefficients,perform a quantization procedure on the transform coefficients to derivequantized transform coefficients, and signal related residualinformation to the decoding apparatus (through a bit stream). Here, theresidual information may include value information of the quantizedtransform coefficients, location information, a transform technique, atransform kernel, a quantization parameter, and the like. The decodingapparatus may perform dequantization/inverse transform procedure basedon the residual information and derive residual samples (or residualblocks). The decoding apparatus may generate a reconstructed picturebased on the predicted block and the residual block. Also, for referencefor inter prediction of a picture afterward, the encoding apparatus mayalso dequantize/inverse-transform the quantized transform coefficientsto derive a residual block and generate a reconstructed picture basedthereon.

In this document, at least one of quantization/dequantization and/ortransform/inverse transform may be omitted. When thequantization/dequantization is omitted, the quantized transformcoefficient may be referred to as a transform coefficient. When thetransform/inverse transform is omitted, the transform coefficient may becalled a coefficient or a residual coefficient or may still be calledthe transform coefficient for uniformity of expression.

In this document, the quantized transform coefficient and the transformcoefficient may be referred to as a transform coefficient and a scaledtransform coefficient, respectively. In this case, the residualinformation may include information on transform coefficient(s), and theinformation on the transform coefficient(s) may be signaled throughresidual coding syntax. Transform coefficients may be derived based onthe residual information (or information on the transformcoefficient(s)), and scaled transform coefficients may be derivedthrough inverse transform (scaling) on the transform coefficients.Residual samples may be derived based on inverse transform (transform)of the scaled transform coefficients. This may be applied/expressed inother parts of this document as well.

The predictor of the encoding apparatus/decoding apparatus may deriveprediction samples by performing inter prediction in units of blocks.Inter prediction can be a prediction derived in a manner that isdependent on data elements (e.g., sample values or motion information,etc) of picture(s) other than the current picture. When the interprediction is applied to the current block, based on the reference block(reference sample arrays) specified by the motion vector on thereference picture pointed to by the reference picture index, thepredicted block (prediction sample arrays) for the current block can bederived. In this case, in order to reduce the amount of motioninformation transmitted in the inter prediction mode, the motioninformation of the current block may be predicted in units of blocks,subblocks, or samples based on the correlation between the motioninformation between neighboring blocks and the current block. The motioninformation may include the motion vector and the reference pictureindex. The motion information may further include inter prediction type(L0 prediction, L1 prediction, Bi prediction, etc.) information. Whenthe inter prediction is applied, the neighboring blocks may include aspatial neighboring block existing in the current picture and a temporalneighboring block existing in the reference picture. The referencepicture including the reference block and the reference pictureincluding the temporal neighboring block may be the same or different.The temporal neighboring block may be called a collocated referenceblock, a collocated CU (colCU), etc., and a reference picture includingthe temporally neighboring block may be called a collocated picture(colPic). For example, a motion information candidate list may beconstructed based on neighboring blocks of the current block, and a flagor index information indicating which candidate is selected (used) toderive the motion vector and/or the reference picture index of thecurrent block may be signaled. The inter prediction may be performedbased on various prediction modes. For example, in the skip mode and themerge mode, the motion information of the current block may be the sameas the motion information of a selected neighboring block. In the skipmode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, a motion vector ofa selected neighboring block may be used as a motion vector predictor,and a motion vector difference may be signaled. In this case, the motionvector of the current block may be derived using the sum of the motionvector predictor and the motion vector difference.

The motion information may include L0 motion information and/or L1motion information according to an inter prediction type (L0 prediction,L1 prediction, Bi prediction, etc.). A motion vector in the L0 directionmay be referred to as an L0 motion vector or MVL0, and a motion vectorin the L1 direction may be referred to as an L1 motion vector or MVL1.The prediction based on the L0 motion vector may be called L0prediction, the prediction based on the L1 motion vector may be calledthe L1 prediction, and the prediction based on both the L0 motion vectorand the L1 motion vector may be called a bi-prediction. Here, the L0motion vector may indicate a motion vector associated with the referencepicture list L0 (L0), and the L1 motion vector may indicate a motionvector associated with the reference picture list L1 (L1). The referencepicture list L0 may include pictures that are previous than the currentpicture in output order as reference pictures, and the reference picturelist L1 may include pictures that are subsequent than the currentpicture in output order. The previous pictures may be called forward(reference) pictures, and the subsequent pictures may be called backward(reference) pictures. The reference picture list L0 may further includepictures that are subsequent than the current picture in output order asreference pictures. In this case, the previous pictures may be indexedfirst, and the subsequent pictures may be indexed next in the referencepicture list L0. The reference picture list L1 may further includepictures previous than the current picture in output order as referencepictures. In this case, the subsequent pictures may be indexed first inthe reference picture list 1 and the previous pictures may be indexednext. Here, the output order may correspond to a picture order count(POC) order.

FIG. 4 exemplarily shows a hierarchical structure for a codedimage/video.

Referring to FIG. 4, the coded image/video is divided into VCL (videocoding layer) that deals with an image/video decoding process anditself, a subsystem that transmits and stores the coded information, anda network abstraction layer (NAL) that exists between the VCL andsubsystems and is responsible for network adaptation functions.

The VCL may generate VCL data including compressed image data (slicedata), or generate parameter sets including a picture parameter set(Picture Parameter Set: PPS), a sequence parameter set (SequenceParameter Set: SPS), a video parameter set (Video Parameter Set: VPS)etc., or a supplemental enhancement information (SEI) messageadditionally necessary for the decoding process of an image.

In the NAL, a NAL unit may be generated by adding header information(NAL unit header) to a raw byte sequence payload (RBSP) generated in theVCL. In this case, the RBSP refers to slice data, parameter sets, SEImessages, etc., generated in the VCL. The NAL unit header may includeNAL unit type information specified according to RBSP data included inthe corresponding NAL unit.

As shown in the figure, the NAL unit may be divided into a VCL NAL unitand a Non-VCL NAL unit according to the RBSP generated in the VCL. TheVCL NAL unit may mean a NAL unit including information (sliced data)about an image, and the Non-VCL NAL unit may mean a NAL unit containinginformation (parameter set or SEI message) necessary for decoding animage.

The above-described VCL NAL unit and Non-VCL NAL unit may be transmittedthrough a network by attaching header information according to a datastandard of the subsystem. For example, the NAL unit may be transformedinto a data form of a predetermined standard such as H.266/VVC fileformat, Real-time Transport Protocol (RTP), Transport Stream (TS), etc.,and transmitted through various networks.

As described above, in the NAL unit, the NAL unit type may be specifiedaccording to the RBSP data structure included in the corresponding NALunit, and information on this NAL unit type may be stored and signaledin the NAL unit header.

For example, the NAL unit may be roughly classified into the VCL NALunit type and the Non-VCL NAL unit type depending on whether the NALunit includes information about the image (slice data). The VCL NAL unittype may be classified according to property and a type of a pictureincluded in the VCL NAL unit, and the Non-VCL NAL unit type may beclassified according to the type of a parameter set.

The following is an example of the NAL unit type specified according tothe type of parameter set included in the Non-VCL NAL unit type.

-   -   APS (Adaptation Parameter Set) NAL unit: Type for NAL unit        including APS    -   DPS (Decoding Parameter Set) NAL unit: Type for NAL unit        including DPS    -   VPS (Video Parameter Set) NAL unit: Type for NAL unit including        VPS    -   SPS (Sequence Parameter Set) NAL unit: Type for NAL unit        including SPS    -   PPS (Picture Parameter Set) NAL unit: Type for NAL unit        including PPS    -   PH (Picture header) NAL unit: Type for NAL unit including PH

The above-described NAL unit types have syntax information for the NALunit type, and the syntax information may be stored and signaled in theNAL unit header. For example, the syntax information may benal_unit_type, and NAL unit types may be specified by a nal_unit_typevalue.

Meanwhile, as described above, one picture may include a plurality ofslices, and one slice may include a slice header and slice data. In thiscase, one picture header may be further added to a plurality of slices(a slice header and a slice data set) in one picture. The picture header(picture header syntax) may include information/parameters commonlyapplicable to the picture. In this document, a slice may be mixed orreplaced with a tile group. Also, in this document, a slice header maybe mixed or replaced with a type group header.

The slice header (slice header syntax or slice header information) mayinclude information/parameters commonly applicable to the slice. The APS(APS syntax) or PPS (PPS syntax) may include information/parameterscommonly applicable to one or more slices or pictures. The SPS (SPSsyntax) may include information/parameters commonly applicable to one ormore sequences. The VPS (VPS syntax) may include information/parameterscommonly applicable to multiple layers. The DPS (DPS syntax) may includeinformation/parameters commonly applicable to the entire video. The DPSmay include information/parameters related to concatenation of a codedvideo sequence (CVS). In this document, high level syntax (HLS) mayinclude at least one of the APS syntax, PPS syntax, SPS syntax, VPSsyntax, DPS syntax, picture header syntax, and slice header syntax.

In this document, the image/video information encoded in the encodingapparatus and signaled in the form of a bitstream to the decodingapparatus may include, as well as picture partitioning-relatedinformation in the picture, intra/inter prediction information, residualinformation, in-loop filtering information, etc., the informationincluded in the slice header, the information included in the pictureheader, the information included in the APS, the information included inthe PPS, the information included in the SPS, the information includedin the VPS, and/or the information included in the DPS. In addition, theimage/video information may further include information of the NAL unitheader.

Meanwhile, in order to compensate for a difference between an originalimage and a reconstructed image due to an error occurring in acompression encoding process such as quantization, an in-loop filteringprocess may be performed on reconstructed samples or reconstructedpictures as described above. As described above, the in-loop filteringmay be performed by the filter of the encoding apparatus and the filterof the decoding apparatus, and a deblocking filter, SAO, and/or adaptiveloop filter (ALF) may be applied. For example, the ALF process may beperformed after the deblocking filtering process and/or the SAO processare completed. However, even in this case, the deblocking filteringprocess and/or the SAO process may be omitted.

Hereinafter, a detailed description of picture reconstruction andfiltering will be described. In the image/video coding, thereconstructed block may be generated based on intra prediction/interprediction for each block, and the reconstructed picture including thereconstructed blocks may be generated. When the current picture/slice isan I picture/slice, the blocks included in the current picture/slice maybe reconstructed based only on the intra prediction. Meanwhile, when thecurrent picture/slice is a P or B picture/slice, the blocks included inthe current picture/slice may be reconstructed based on the intraprediction or inter prediction. In this case, the intra prediction maybe applied to some blocks in the current picture/slice, and the interprediction may be applied to the remaining blocks.

The intra prediction may represent a prediction for generatingprediction samples for the current block based on reference samples inthe picture (hereinafter, current picture) to which the current blockbelongs. In case that the intra prediction is applied to the currentblock, neighboring reference samples to be used for the intra predictionof the current block may be derived. The neighboring reference samplesof the current block may include a sample adjacent to a left boundary ofthe current block having a size of nW×nH, total 2×nH samples neighboringthe bottom-left, a sample adjacent to the top boundary of the currentblock, total 2×nW samples neighboring the top-right, and one sampleneighboring the top-left of the current block. Alternatively, theneighboring reference samples of the current block may include topneighboring sample of plural columns and left neighboring sample ofplural rows. Alternatively, the neighboring reference samples of thecurrent block may include total nH samples adjacent to the rightboundary of the current block having a size of nW×nH, total nH samplesadjacent to the right boundary of the current block, total nW samplesadjacent to the bottom boundary of the current block, and one sampleneighboring the bottom-right of the current block.

However, some of the neighboring reference samples of the current blockmay have not yet been decoded or may not be available. In this case, thedecoder may configure the neighboring reference samples to be used forthe prediction through substitution of available samples for theunavailable samples. Alternatively, the neighboring reference samples tobe used for the prediction may be configured through interpolation ofthe available samples.

When the neighboring reference samples are derived, the predictionsample may be derived based on the average or interpolation of theneighboring reference samples of the current block, and (ii) theprediction sample may be derived based on a reference sample existing ina specific (prediction) direction with respect to a prediction sampleamong the neighboring reference samples of the current block. The caseof (i) may be called a non-directional mode or a non-angular mode, andthe case of (ii) may be called a directional mode or an angular mode.Also, the prediction sample may be generated through interpolationbetween the first neighboring sample and the second neighboring samplelocated in a direction opposite to the prediction direction of the intraprediction mode of the current block based on the prediction sample ofthe current block among the neighboring reference samples. Theabove-described case may be referred to as linear interpolation intraprediction (LIP). In addition, the chroma prediction samples may begenerated based on the luma samples using the linear model. This casemay be called an LM mode. In addition, the temporary prediction sampleof the current block may be derived based on the filtered peripheralreference samples, and the prediction sample of the current block byweighted summing the temporary prediction sample and at least onereference sample derived according to the intra prediction mode amongthe existing neighboring reference samples, that is, unfilteredneighboring reference samples may be derived. The above-described casemay be called position dependent intra prediction (PDPC). In addition,by selecting a reference sample line having the highest predictionaccuracy among the multiple neighboring reference sample lines of thecurrent block, the prediction sample may be derived using the referencesample located in the prediction direction in the corresponding line. Inthis case, the intra prediction encoding may be performed by instructing(signaling) the used reference sample line to the decoding apparatus.The above-described case may be called multi-reference line (MRL) intraprediction or MRL-based intra prediction. In addition, the current blockmay be divided into vertical or horizontal sub-partitions to perform theintra prediction based on the same intra prediction mode, but theneighboring reference samples may be derived and used in units of thesub-partitions. That is, in this case, the intra prediction mode for thecurrent block may be equally applied to the sub-partitions, but theintra prediction performance may be improved in some cases by derivingand using the peripheral reference samples in units of sub-partitions.This prediction method may be called intra sub-partitions (ISP) orISP-based intra prediction. The above-described intra prediction methodsmay be called an intra prediction type to be distinguished from theintra prediction mode in Table of Contents 1.2. The intra predictiontype may be referred to by various terms such as an intra predictiontechnique or an additional intra prediction mode. For example, the intraprediction type (or additional intra prediction mode, etc.) may includeat least one of the above-described LIP, PDPC, MRL, and ISP. A generalintra prediction method excluding a specific intra prediction type suchas the LIP, PDPC, MRL, and ISP may be called a normal intra predictiontype. The normal intra prediction type may be generally applied when theabove specific intra prediction type is not applied, and the predictionmay be performed based on the above-described intra prediction mode.Meanwhile, if necessary, the post-processing filtering may be performedon the derived prediction sample.

Specifically, the intra prediction procedure may include determining anintra prediction mode/type, deriving a peripheral reference sample, andderiving a prediction sample based on an intra prediction mode/type. Inaddition, if necessary, the post-processing filtering may be performedon the derived prediction sample.

Hereinafter, the intra prediction in the encoding apparatus will bedescribed. The encoding apparatus performs the intra prediction on thecurrent block. The encoding apparatus may derive an intra predictionmode for the current block, derive neighboring reference samples of thecurrent block, and generate prediction samples in the current blockbased on the intra prediction mode and the neighboring referencesamples. Here, the procedures of determining the intra prediction mode,deriving the neighboring reference samples, and generating theprediction samples may be performed simultaneously, or any one proceduremay be performed before another procedure. For example, the intrapredictor 222 of the encoding apparatus may include a predictionmode/type determiner, a reference sample deriver, and a predictionsample deriver, the prediction mode/type determiner may determine theintra prediction mode/type for the current block, the reference samplederiver may derive neighboring reference samples of the current block,and the prediction sample deriver may derive motion samples of thecurrent block. Meanwhile, although not illustrated, when a predictionsample filtering procedure to be described later is performed, the intrapredictor 222 may further include a prediction sample filter. Theencoding apparatus may determine a mode applied to the current blockfrom among a plurality of intra prediction modes. The encoding apparatusmay compare RD costs for the intra prediction modes and determine anoptimal intra prediction mode for the current block.

Meanwhile, the encoding apparatus may perform a prediction samplefiltering procedure. The prediction sample filtering may be referred toas post filtering. Some or all of the prediction samples may be filteredby the prediction sample filtering procedure. In some cases, theprediction sample filtering procedure may be omitted.

The encoding apparatus derives residual samples for the current blockbased on the prediction samples. The encoding apparatus may compare theprediction samples in the original samples of the current block based onthe phase and derive the residual samples.

The encoding apparatus may transform/quantize the residual samples toderive quantized transform coefficients, and then performdequantization/inverse transform processing on the quantized transformcoefficients to derive (modified) residual samples. The reason forperforming the dequantization/inverse transform again after thetransform/quantization is to derive the same residual samples as theresidual samples derived from the decoding apparatus as described above.

The encoding apparatus may generate a reconstructed block includingreconstructed samples for the current block based on the predictionsamples and the (modified) residual samples. A reconstructed picture forthe current picture may be generated based on the reconstructed block.

As described above, the encoding apparatus encodes image informationincluding prediction information on the intra prediction (e.g.,prediction mode information indicating a prediction mode) and residualinformation on the intra and residual samples to output the encodedimage information into the form of the bitstream. The residualinformation may include a residual coding syntax. The encoding apparatusmay transform/quantize the residual samples to derive the quantizedtransform coefficients. The residual information may include informationon the quantized transform coefficients.

FIG. 5 is a flowchart for describing an intra prediction-based blockreconstruction method in a decoding apparatus. FIG. 6 illustrates anintra predictor in a decoding apparatus.

The decoding apparatus may perform an operation corresponding to theoperation performed by the encoding apparatus.

S500 to S520 may be performed by the intra predictor 331 of the decodingapparatus, and the prediction information of S500 and the residualinformation of S530 may be obtained from the bitstream by the entropydecoder 310 of the decoding apparatus. The residual processor 320 of thedecoding apparatus may derive the residual samples for the current blockbased on the residual information. Specifically, the dequantizer 321 ofthe residual processing unit 320 may derive the transform coefficientsby performing the dequantization based on the quantized transformcoefficients derived based on the residual information, and the inversetransform unit 322 of the residual processing unit may derive theresidual samples for the current block by performing the inversetransform on the transform coefficients. S540 may be performed by theadder 340 or the reconstructor of the decoding apparatus.

In detail, the decoding apparatus may derive an intra prediction modefor the current block based on the received prediction mode information(S500). The decoding apparatus may derive neighboring reference samplesof the current block (S510). The decoding apparatus generates theprediction samples in the current block based on the intra predictionmode and the neighboring reference samples (S520). In this case, thedecoding apparatus may perform the prediction sample filteringprocedure. The prediction sample filtering may be referred to as postfiltering. Some or all of the prediction samples may be filtered by theprediction sample filtering procedure. In some cases, the predictionsample filtering procedure may be omitted.

The decoding apparatus generates the residual samples for the currentblock based on the received residual information (S530). The decodingapparatus may generate the reconstructed samples for the current blockbased on the prediction samples and the residual samples, and may derivethe reconstructed block including the reconstructed samples (S540). Thereconstructed picture for the current picture may be generated based onthe reconstructed block.

Here, the intra predictor 331 of the decoding apparatus may include aprediction mode/type determiner 331-1, a reference sample deriver 331-2,and a prediction sample deriver 331-3, the prediction mode/typedeterminer 331-1 may determine an intra prediction mode for the currentblock based on prediction mode information obtained from the entropydecoder 310 of the decoding apparatus, the reference sample deriver331-2 may derive neighboring reference samples of the current block, andthe prediction sample deriver 331-3 may derive prediction samples of thecurrent block. Meanwhile, although not shown, when a prediction samplefiltering procedure described above is performed, the intra predictor331 may further include a prediction sample filter unit (not shown).

The prediction information may include intra prediction mode informationand/or intra prediction type information. The intra prediction modeinformation may include, for example, flag information (e.g., intra lumampm flag) indicating whether a most probable mode (MPM) is applied tothe current block or a remaining mode is applied, and when the MPM isapplied to the current block, the prediction mode information mayfurther include index information (e.g., intra luma mpm idx) indicatingone of the intra prediction mode candidates (MPM candidates). The intraprediction mode candidates (MPM candidates) may be composed of an MPMcandidate list or an MPM list. In addition, when the MPM is not appliedto the current block, the intra prediction mode information may furtherinclude remaining mode information (e.g., intra luma mpm remainder)indicating one of the remaining intra prediction modes except for theintra prediction mode candidates (MPM candidates). The decodingapparatus may determine the intra prediction mode of the current blockbased on the intra prediction mode information. A separate MPM list maybe configured for the above-described MIP

In addition, the intra prediction type information may be implemented invarious forms. For example, the intra prediction type information mayinclude intra prediction type index information indicating one of theintra prediction types. As another example, the intra-prediction typeinformation may include at least one of reference sample lineinformation (ex intra_luma_ref_idx) indicating whether the MRL isapplied to the current block and, when applied, how many referencesample lines are used, ISP flag information indicating whether the ISPis applied to the current block (ex intra_subpartitions_mode_flag), ISPtype information indicating a split type of subpartitions when the ISPis applied (ex intra_subpartitions_split_flag), the flag informationindicating whether PDCP is applied, or flag information indicatingwhether the LIP is applied. In addition, the intra prediction typeinformation may include a MIP flag indicating whether MIP is applied tothe current block.

The intra prediction mode information and/or the intra prediction typeinformation may be encoded/decoded through the coding method describedin the present disclosure. For example, the intra prediction modeinformation and/or the intra prediction type information may beencoded/decoded through entropy coding (e.g., CABAC, CAVLC) coding basedon a truncated (rice) binary code.

The prediction unit of the encoding apparatus/decoding apparatus mayderive prediction samples by performing inter prediction in units ofblocks. The inter prediction can be a prediction derived in a mannerthat is dependent on data elements (e.g., sample values or motioninformation) of picture(s) other than the current picture). When interprediction is applied to the current block, the predicted block(prediction sample array) for the current block may be derived based onthe reference block (reference sample array) specified by the motionvector on the reference picture indicated by the reference pictureindex. In this case, in order to reduce the amount of motion informationtransmitted in the inter prediction mode, the motion information of thecurrent block may be predicted in units of blocks, subblocks, or samplesbased on the correlation between motion information between neighboringblocks and the current block. The motion information may include amotion vector and a reference picture index. The motion information mayfurther include the inter prediction type (L0 prediction, L1 prediction,Bi prediction, etc.) information. When the inter prediction is applied,the neighboring blocks may include spatial neighboring blocks present inthe current picture and temporal neighboring blocks present in thereference picture. The reference picture including the reference blockand the reference picture including the temporal neighboring block maybe the same or different. The temporal neighboring block may be called acollocated reference block, a collocated CU (colCU), etc., and thereference picture including the temporal neighboring block may be calleda collocated picture (colPic). For example, a motion informationcandidate list may be constructed based on neighboring blocks of thecurrent block, and a flag or index information indicating whichcandidate is selected (used) to derive the motion vector and/orreference picture index of the current block may be signaled. The interprediction may be performed based on various prediction modes. Forexample, in the case of a skip mode and a merge mode, the motioninformation of the current block may be the same as motion informationof the selected neighboring block. In the case of the skip mode, unlikethe merge mode, a residual signal may not be transmitted. In the case ofthe motion vector prediction (MVP) mode, the motion vector of theselected neighboring block may be used as a motion vector predictor, anda motion vector difference may be signaled. In this case, the motionvector of the current block may be derived using the sum of the motionvector predictor and the motion vector difference.

FIG. 7 is a flowchart for describing an inter prediction-based blockreconstruction method in an encoding apparatus.

S700 may be performed by the inter predictor 221 of the encodingapparatus, and S710 to S730 may be performed by the residual processor230 of the encoding apparatus. Specifically, S710 may be performed bythe substractor 231 of the encoding apparatus, S720 may be performed bythe transformer 232 and the quantizer 233 of the encoding apparatus, andS730 may be performed by the dequantizer 234 and the inverse transformer235 of the encoding apparatus. In S700, the prediction information maybe derived by the inter predictor 221 and encoded by the entropy encoder240. The residual information may be derived through S710 and S720 andencoded by the entropy encoder 240. The residual information is theinformation on the residual samples. The residual information mayinclude the information on the quantized transform coefficients for theresidual samples. As described above, the residual samples may bederived as the transform coefficients through the transformer 232 of theencoding apparatus, and the transform coefficients may be derived as thequantized transform coefficients through the quantizer 233. Theinformation on the quantized transform coefficients may be encoded bythe entropy encoder 240 through the residual coding procedure.

The encoding apparatus performs the inter prediction on the currentblock (S700). The encoding apparatus may derive the inter predictionmode and motion information of the current block, and generate theprediction samples of the current block. Here, the procedures ofdetermining the inter prediction mode, deriving the motion information,and generating the prediction samples may be performed simultaneously,or any one procedure may be performed before another procedure. Forexample, the inter predictor 221 of the encoding apparatus may include aprediction mode determiner, a motion information deriver, and aprediction sample deriver, the prediction mode determiner may determinea prediction mode for the current block, the motion information derivermay derive motion information of the current block, and the predictionsample deriver may derive motion samples of the current block. Forexample, the inter predictor 221 of the encoding apparatus searches fora block similar to the current block within a predetermined area (searcharea) of reference pictures through motion estimation, and may derive areference block having a difference from the current block equal to orless than a minimum or a predetermined criterion. Based on this, areference picture index indicating a reference picture in which thereference block is positioned may be derived, and a motion vector may bederived based on a position difference between the reference block andthe current block. The encoding apparatus may determine a mode appliedto the current block from among various prediction modes. The encodingapparatus may compare RD costs for the various prediction modes anddetermine an optimal prediction mode for the current block.

For example, when the skip mode or the merge mode is applied to thecurrent block, the encoding apparatus may construct a merge candidatelist to be described later, and derive a reference block having adifference of a minimum or a predetermined criterion or less from acurrent block among reference blocks indicated by merge candidatesincluded in the merge candidate list. In this case, a merge candidateassociated with the derived reference block may be selected, and mergeindex information indicating the selected merge candidate may begenerated and signaled to the decoding apparatus. The motion informationof the current block may be derived using motion information of theselected merge candidate.

As another example, when a (A)MVP mode is applied to the current block,the encoding apparatus may construct a (A)MVP candidate list to bedescribed later, and may use a motion vector of an mvp candidateselected from among motion vector predictor (mvp) candidates included inthe (A)MVP candidate list as the mvp of the current block. In this case,for example, the motion vector indicating the reference block derived bythe above-described motion estimation may be used as the motion vectorof the current block, and an mvp candidate having a motion vector havingthe smallest difference from the motion vector of the current blockamong the mvp candidates may be the selected mvp candidate. A motionvector difference (MVD), which is a difference obtained by subtractingmvp from the motion vector of the current block, may be derived. In thiscase, information on the MVD may be signaled to the decoding apparatus.In addition, when the (A)MVP mode is applied, the value of the referencepicture index may be separately signaled to the decoding apparatus byconstructing the reference picture index information.

The encoding apparatus may derive the residual samples based on theprediction samples (S710). The encoding apparatus may derive theresidual samples through the comparison of the prediction samples withthe original samples of the current block.

The encoding apparatus may transform/quantize the residual samples toderive quantized transform coefficients (S720), and then performdequantization/inverse transform processing on the quantized transformcoefficients to derive (modified) residual samples (S730). The reasonfor performing the dequantization/inverse transform again after thetransform/quantization is to derive the same residual samples as theresidual samples derived from the decoding apparatus as described above.

The encoding apparatus may generate a reconstructed block includingreconstructed samples for the current block based on the predictionsamples and the (modified) residual samples (S740). The reconstructedpicture for the current picture may be generated based on thereconstructed block.

Although not shown, as described above, the encoding apparatus mayencode image information including the prediction information and theresidual information. The encoding apparatus may output encoded imageinformation in the form of a bitstream. The prediction information isinformation related to the prediction procedure and may includeprediction mode information (eg, skip flag, merge flag, or mode index,etc.) and motion information. The information on the motion informationmay include candidate selection information (eg, merge index, mvp flagor mvp index) that is information for deriving a motion vector. Inaddition, the information on the motion information may include theabove-described MVD information and/or reference picture indexinformation. Also, the information on the motion information may includeinformation indicating whether L0 prediction, L1 prediction, orbi-prediction is applied. The residual information is information on theresidual samples. The residual information may include information onthe quantized transform coefficients for the residual samples.

The output bitstream may be stored in a (digital) storage medium andtransmitted to the decoding apparatus, or may be transmitted to thedecoding apparatus through a network.

FIG. 8 is a flowchart for describing an inter prediction-based blockreconstruction method in a decoding apparatus. FIG. 9 illustrates aninter predictor in the decoding apparatus.

The decoding apparatus may perform an operation corresponding to theoperation performed by the encoding apparatus.

S800 to S820 may be performed by the inter predictor 332 of the decodingapparatus, and the prediction information of S800 and the residualinformation of S830 may be obtained from the bitstream by the entropydecoder 310 of the decoding apparatus. The residual processor 320 of thedecoding apparatus may derive the residual samples for the current blockbased on the residual information. Specifically, the dequantizer 321 ofthe residual processing unit 320 may derive the transform coefficientsby performing the dequantization based on the quantized transformcoefficients derived based on the residual information, and the inversetransform unit 322 of the residual processing unit may derive theresidual samples for the current block by performing the inversetransform on the transform coefficients. S840 may be performed by theadder 340 or the reconstructor of the decoding apparatus.

In detail, the decoding apparatus may determine a prediction mode forthe current block based on the received prediction mode information(S800). The decoding apparatus may determine which inter prediction modeis applied to the current block based on the prediction mode informationin the prediction information.

For example, based on the merge flag, it may be determined whether themerge mode is applied to the current block or whether the (A)MVP mode isdetermined. Alternatively, one of various inter prediction modecandidates may be selected based on the mode index. The inter predictionmode candidates may include the skip mode, the merge mode, and/or the(A)MVP mode, or may include various inter prediction modes to bedescribed later.

The decoding apparatus may derive the motion information of the currentblock based on the determined inter prediction mode (S810). For example,when the skip mode or the merge mode is applied to the current block,the decoding apparatus may construct a merge candidate list to bedescribed later and select one merge candidate from among the mergecandidates included in the merge candidate list. The selection may beperformed based on the above-described selection information (mergeindex). The motion information of the current block may be derived usingthe motion information of the selected merge candidate. The motioninformation of the selected merge candidate may be used as the motioninformation of the current block.

As another example, when a (A)MVP mode is applied to the current block,the decoding apparatus may construct a (A)MVP candidate list to bedescribed later, and may use a motion vector of an mvp candidateselected from among motion vector predictor (mvp) candidates included inthe (A)MVP candidate list as the mvp of the current block. The selectionmay be performed based on the above-described selection information (mvpflag or mvp index). In this case, the MVD of the current block may bederived based on the information on the MVD, and the motion vector ofthe current block may be derived based on the mvp and MVD of the currentblock. Also, the reference picture index of the current block may bederived based on the reference picture index information. The pictureindicated by the reference picture index in the reference picture listfor the current block may be derived as the reference picture referencedfor the inter prediction of the current block.

Meanwhile, as described below, the motion information of the currentblock may be derived without constructing a candidate list, and in thiscase, the motion information of the current block may be derivedaccording to the procedure disclosed in the prediction mode to bedescribed later. In this case, the candidate list configuration asdescribed above may be omitted.

The decoding apparatus may generate the prediction samples for thecurrent block based on the motion information of the current block(S820). In this case, the reference picture may be derived based on thereference picture index of the current block, and the prediction samplesof the current block may be derived using the samples of the referenceblock indicated by the motion vector of the current block on thereference picture. In this case, as described below, in some cases, theprediction sample filtering procedure may be further performed on all orsome of the prediction samples of the current block.

For example, the inter predictor 332 of the decoding apparatus mayinclude a prediction mode determiner 332-1, a motion information deriver332-2, and a prediction sample deriver 332-3, in which the predictionmode determiner 332-1 may determine the prediction mode for the currentblock based on the received prediction mode information, the motioninformation deriver 332-2 may derive the motion information (motionvector and/or reference picture index, etc.) of the current block basedon the received motion information information, and the predictionsample deriver 332-3 may derive the prediction samples of the currentblock.

The decoding apparatus generates the residual samples for the currentblock based on the received residual information (S830). The decodingapparatus may generate the reconstructed samples for the current blockbased on the prediction samples and the residual samples, and may derivethe reconstructed block including the reconstructed samples (S840). Thereconstructed picture for the current picture may be generated based onthe reconstructed block.

Various inter prediction modes may be used for prediction of a currentblock in a picture. For example, various modes such as a merge mode, askip mode, a motion vector prediction (MVP) mode, an affine mode, asubblock merge mode, or a merge with MVD (MMVD) mode may be used. Inaddition, a decoder side motion vector refinement (DMVR) mode, anadaptive motion vector resolution (AMVR) mode, a bi-prediction withCU-level weight, or a bi-directional optical flow (BDOF), etc., may beused in addition or instead as ancillary mods. The affine mode may becalled an affine motion prediction mode. The MVP mode may be called anadvanced motion vector prediction (AMVP) mode. In the presentdisclosure, some modes and/or motion information candidates derived bysome modes may be included as one of motion information-relatedcandidates of other modes. For example, the HMVP candidate may be addedas a merge candidate of the merge/skip mode, or may be added as an mvpcandidate of the MVP mode.

The prediction mode information indicating the inter prediction mode ofthe current block may be signaled from the encoding apparatus to thedecoding apparatus. The prediction mode information may be included inthe bitstream and received by the decoding apparatus. The predictionmode information may include index information indicating one of aplurality of candidate modes. Alternatively, the inter prediction modemay be indicated through hierarchical signaling of flag information. Inthis case, the prediction mode information may include one or moreflags. For example, the skip flag may be signaled to indicate whetherthe skip mode is applied, the merge flag may be signaled when the skipmode is not applied to indicate whether to apply the merge mode, and itis indicated that the MVP mode is applied or the flag for additionalclassification may be further signaled when the merge mode is notapplied. The affine mode may be signaled as an independent mode, or maybe signaled as a mode dependent on the merge mode or the MVP mode. Forexample, the affine mode may include an affine merge mode and an affineMVP mode.

Meanwhile, the information indicating whether the above-described list0(L0) prediction, list1 (L1) prediction, or bi-prediction is used in thecurrent block (current coding unit) may be signaled to the currentblock. The information may be called the motion prediction directioninformation, the inter prediction direction information, or the interprediction indication information, and may beconfigured/encoded/signaled in the form of, for example, aninter_pred_idc syntax element. That is, the inter_pred_idc syntaxelement may indicate whether the above-described list0 (L0) prediction,list1 (L1) prediction, or bi-prediction is used for the current block(current coding unit). In the present disclosure, for convenience ofdescription, the inter prediction type (L0 prediction, L1 prediction, orBI prediction) indicated by the inter_pred_idc syntax element may beindicated as a motion prediction direction. The L0 prediction may beindicated by pred_L0, the L1 prediction may be indicated by pred_L1, andthe bi prediction may be indicated by pred_BI. For example, predictiontypes as shown in the following table may be determined according to thevalue of the inter_pred_idc syntax element.

TABLE 1 Name of inter_pred_idc inter_pred_idc ( cbWidth + cbHeight ) !=8 ( cbWidth + cbHeight ) = = 8 0 PRED_L0 PRED_L0 1 PRED_L1 PRED_L1 2PRED_BI n.a.

As described above, one picture may include one or more slices. Theslice may have one of slice types including an intra (I) slice, apredictive (P) slice, and a bi-predictive (B) slice. The slice type maybe indicated based on slice type information. For blocks in the I slice,the inter prediction is not used for prediction, and only the intraprediction may be used. Of course, even in this case, the originalsample value may be coded and signaled without the prediction. Forblocks in the P slice, the intra prediction or the inter prediction maybe used, and when the inter prediction is used, only uni prediction maybe used. Meanwhile, for blocks in the B slice, the intra prediction orthe inter prediction may be used, and when the inter prediction is used,only bi prediction may be used.

L0 and L1 may include reference pictures encoded/decoded before thecurrent picture. For example, L0 may include reference pictures beforeand/or after the current picture in POC order, and L1 may include theprevious pictures after and/or before the current picture in the POCorder. In this case, in L0, a relatively lower reference picture indexmay be allocated to reference pictures before the current picture in POCorder, and in L1, a relatively lower reference picture index may beallocated to reference pictures after the current picture in POC order.In the case of the B slice, the bi-prediction may be applied, and evenin this case, the unidirectional bi-prediction may be applied, or thebi-directional bi-prediction may be applied. The bi-directionalbi-prediction may be called true bi-prediction.

As described above, a residual block (residual samples) may be derivedbased on a predicted block (prediction samples) derived through theprediction at the encoding stage, and the residual information may begenerated by performing the transform/quantization on the residualsamples. The residual information may include information on thequantized transform coefficients. The residual information may beincluded in the video/image information, and the video/image informationmay be encoded and transmitted to the decoding apparatus in the form ofthe bitstream. The decoding apparatus may obtain the residualinformation from the bitstream, and may derive the residual samplesbased on the residual information. In detail, the decoding apparatus mayderive the quantized transform coefficients based on the residualinformation, and derive the residual block (residual samples) throughthe dequantization/inverse transform process.

Meanwhile, at least one process of the (inverse) transform and/or (de)quantization may be omitted.

Hereinafter, the in-loop filtering process performed for thereconstructed picture will be described. The modified reconstructedsample, block, and picture (or modified filtered sample, block, picture)may be generated through the in-loop filtering process, and in thedecoding apparatus, the modified (modified filtered) reconstructedpicture may be output as a decoded picture, and may also be stored inthe decoded picture buffer or memory of the encoding apparatus/decodingapparatus and then used as the reference picture in the inter predictionprocess when encoding/decoding the picture. The in-loop filteringprocess may include a deblocking filtering process, a sample adaptiveoffset (SAO) process, and/or an adaptive loop filter (ALF) process, orthe like as described above. In this case, one or some of the deblockingfiltering process, the sample adaptive offset (SAO) process, theadaptive loop filter (ALF) process, and the bi-lateral filter processmay be sequentially applied, or all of them are sequentially may beapplied. For example, after the deblocking filtering process is appliedto the reconstructed picture, the SAO process may be performed.Alternatively, for example, after the deblocking filtering process isapplied to the reconstructed picture, the ALF process may be performed.This may be performed in the encoding apparatus as well.

The deblocking filtering is a filtering technique that removesdistortion at the boundary between blocks in the reconstructed picture.The deblocking filtering process may, for example, derive a targetboundary from the reconstructed picture, determine boundary strength(bS) for the target boundary, and perform the deblocking filtering onthe target boundary based on the bS. The bS may be determined based on aprediction mode of two blocks adjacent to the target boundary, adifference in motion vectors, whether the reference pictures are thesame, whether a non-zero significant coefficient exists, and the like.

The SAO is a method of compensating for an offset difference between thereconstructed picture and the original picture in units of samples, andmay be applied based on, for example, types such as a band offset and anedge offsetc. According to the SAO, samples may be classified intodifferent categories according to each SAO type, and an offset value maybe added to each sample based on the category. The filtering informationfor SAO may include information on whether the SAO is applied, the SAOtype information, the SAO offset value information, and the like. TheSAO may be applied to the reconstructed picture after the deblockingfiltering is applied.

An adaptive loop filter (ALF) is a technique of filtering areconstructed picture in units of samples based on filter coefficientsaccording to filter shapes. The encoding apparatus may determine whetherto apply the ALF, an ALF shape and/or an ALF filtering coefficient,etc., through comparison of the reconstructed picture and the originalpicture, and may signal the decoding device. That is, the filteringinformation for the ALF may include information on whether to apply theALF, the ALF filter shape information, the ALF filtering coefficientinformation, and the like. The ALF may be applied to the reconstructedpicture after the deblocking filtering is applied.

FIG. 10 shows an example of the shape of the ALF filter.

(a) of FIC. 10 shows the shape of a 7×7 diamond filter, (b) of FIG. 10shows the shape of a 5×5 diamond filter. In FIG. 10, Cn in the filtershape represents a filter coefficient. When n in Cn is the same, thisindicates that the same filter coefficients can be assigned. In thisdocument, a position and/or unit to which filter coefficients areassigned according to the filter shape of the ALF may be referred to asa filter tab. In this case, one filter coefficient may be assigned toeach filter tap, and the arrangement of the filter taps may correspondto the filter shape. A filter tab located at the center of the filtershape may be referred to as a center filter tab. The same filtercoefficients may be assigned to two filter taps of the same n value thatexist at positions corresponding to each other with respect to thecenter filter tap. For example, in the case of the 7×7 diamond filtershape, 25 filter taps are included, and since filter coefficients C0 toC11 are assigned in a centrally symmetric form, filter coefficients canbe assigned to the 25 filter taps using only 13 filter coefficients.Also, for example, in the case of the 5×5 diamond filter shape, 13filter taps are included, and since filter coefficients C0 to C5 areallocated in the centrally symmetrical form, filter coefficients can beallocated to the 13 filter taps using only 7 filter coefficients. Forexample, in order to reduce the data amount of information aboutsignaled filter coefficients, 12 filter coefficients of the 13 filtercoefficients for the 7×7 diamond filter shape are signaled (explicitly),and 1 filter coefficient can be derived (implicitly). Also, for example,6 coefficients of 7 filter coefficients for the 5×5 diamond filter shapemay be signaled (explicitly) and 1 filter coefficient may be derived(implicitly).

According to an embodiment of this document, the ALF parameter used forthe ALF process may be signaled through an adaptation parameter set(APS). The ALF parameter may be derived from filter information or ALFdata for the ALF.

The ALF is a type of in-loop filtering technique that can be applied inthe image/video coding as described above. The ALF may be performedusing a Wiener-based adaptive filter. This may be to minimize a meansquare error (MSE) between original samples and decoded samples (orreconstructed samples). A high level design for an ALF tool mayincorporate syntax elements accessible in the SPS and/or the sliceheader (or the tile group header).

In one example, before filtering for each 4×4 luma block, geometrictransformations such as rotation or diagonal and vertical flipping maybe applied to filter coefficients f(k, l) depending on gradient valuescalculated for the block and the corresponding filter clipping valuesc(k, l). This is equivalent to applying these transforms to the samplesin the filter support area. Creating other blocks to which the ALF isapplied may be similar to arranging these blocks according to theirdirectionality.

For example, three transforms, diagonal, vertical flip, and rotation maybe performed based on the following equations.

Diagonal: f_D(k,l)=f(l,k),c_D(k,l)=(1,k)  [Equation 1]

Vertical flip: f_V(k,l)f(k,K−l−1),c_V(k,l)=c(k,K−l−1)  [Equation 2]

Rotation: f_R(k,l)=f(K−l−1,k),c_R(k,l)=c(K−l−1,k)  [Equation 3]

In Equations 1 to 3, K may be the size of the filter. 0≤k and 1≤K−1 maybe coefficients coordinates. For example, (0, 0) may be upper leftcorner coordinates, and/or (K−1, K−1) may be lower right cornercoordinates. The relationship between the transforms and four gradientsin four directions may be summarized as the following table

TABLE 2 Gradient values Transformation g_(d2) < g_(d1) and g_(h) < g_(v)No transformation g_(d2) < g_(d1) and g_(v) < g_(h) Diagonal g_(d1) <g_(d2) and g_(h) < g_(v) Vertical flip g_(d1) < g_(d2) and g_(v) < g_(h)Rotation

The ALF filter parameters may be signaled in the APS and slice header.In one APS, up to 25 luma filter coefficients and clipping value indicesmay be signaled. In one APS, up to 8 chroma filter coefficients andclipping value indices may be signaled. In order to reduce bit overhead,filter coefficients of different classifications for the luma componentmay be merged. In the slice header, indexes of APSs (referenced by thecurrent slice) used for the current slice may be signaled.

The clipping value indexes decoded from the APS may make it possible todetermine clipping values using a luma table of clipping values and achroma table of clipping values. These clipping values may be dependenton an internal bitdepth. More specifically, the luma table of theclipping values and the chroma table of the clipping values may bederived based on the following equations

AlfClipL={round(2{circumflex over ( )}B(N−α+1)N)) for n∈[1 . . .N]}  [Equation 4]

AlfClipC={round(2{circumflex over ( )}(B−S)+8((N−n))/(N−1))) for n∈1 . .. N}  [Equation 5]

In the above equations, B may be the internal bitdepth, and N may be thenumber of allowed clipping values (predetermined number). For example, Nmay be 4.

In the slice header, up to 7 APS indexes may be signaled to indicate theluma filter sets used for the current slice. The filtering process maybe further controlled at the CTB level. For example, the flag indicatingwhether the ALF is applied to the luma CTB may be signaled. The luma CTBmay select one filter set from 16 fixed filter sets and filter sets fromthe APSs. The filter set index may be signaled for luma CTB to indicatewhich filter set is applied. The 16 fixed filter sets may be predefinedand hard-coded in both the encoder and decoder.

For the chroma component, the APS index may be signaled in the sliceheader to indicate the chroma filter sets used for the current slice. Atthe CTB level, when there are two or more chroma filter sets in the APS,a filter index may be signaled for each chroma CTB.

The filter coefficients may be quantized with 128 as the norm. To limitthe multiplication complexity, bitstream conformance may be applied, andthus, coefficient values of non-central position may range from 0 to 28and/or the coefficient values of the remaining positions may range from−27 to 27-1. The center position coefficient may not be signaled in thebitstream and may be previously determined (considered) as 128.

When the ALF is available for the current block, each sample R(i, j) maybe filtered, and the filtered result R′(i, j) may be expressed as thefollowing equation.

R′(i,j)=R(i,j)+((Σ_(k=0)Σ_(l=0)f(k,l)×K(R(i+k,j+l)−R(i,j),c(k,l))+64)>>7)  [Equation 6]

In the above equation, f(k, l) may be decoded filter coefficients, K(x,y) may be a clipping function, and c(k, l) may be decoded clippingparameters. For example, the variables k and/or l may vary from −L/2 toL/2. Here, L may represent a filter length. The clipping function K(x,y)=min(y, max(−y, x)) may correspond to the function Clip3(−y, y, x).

In one example, to reduce the line buffer requirement of the ALF, themodified block classification and filtering may be applied for samplesadjacent to horizontal CTU boundaries. For this purpose, the virtualboundary may be defined.

FIG. 11 is a diagram for describing a virtual boundary applied to afiltering process according to an embodiment of the present disclosure.FIG. 12 is a diagram illustrating an example of an ALF process using thevirtual boundary according to the embodiment of the present disclosure.FIG. 12 will be described in conjunction with FIG. 11.

Referring to FIG. 11, the virtual boundary may be a line defined byshifting a horizontal CTU boundary by N samples. In one example, N maybe 4 for a luma component, and/or N may be 2 for a chroma component.

In FIG. 11, a modified block classification may be applied to the lumacomponent. For 1D Laplacian gradient calculation of a 4×4 block on thevirtual boundary, only samples above the virtual boundary may be used.Similarly, for 1D Laplacian gradient calculation of a 4×4 block belowthe virtual boundary, only samples below the virtual boundary may beused. The quantization of the vitality value A may be scaled by takinginto account the reduced number of samples used in the 1D Laplaciangradient calculation.

For the filtering process, a symmetric padding operation at virtualboundaries may be used for the luma and chroma components. Referring toFIG. 12, when the filtered sample is located below the virtual boundary,neighboring samples located above the virtual boundary may be padded.Meanwhile, the corresponding samples on the other side may also besymmetrically padded.

The process described according to FIG. 12 may also be used forboundaries of slices, bricks, and/or tiles when no filter is availableacross the boundaries. For the ALF block classification, only samplesincluded in the same slice, brick, and/or tile may be used and thevitality value may be scaled accordingly. For the ALF filtering, thesymmetrical padding may be applied for each of the horizontal and/orvertical directions relative to the horizontal and/or verticalboundaries.

FIG. 13 is a diagram for describing a cross-component adaptive loopfiltering (CCALF (CC-ALF)) process according to an embodiment of thepresent disclosure. The CCALF process may be referred to as across-component filtering process.

In one aspect, the ALF process may include a general ALF process and aCCALF process. That is, the CCALF process may be called some processesof the ALF process. In another aspect, the filtering process may includea deblocking process, a SAO process, an ALF process, and/or a CCALFprocess.

The CC-ALF may refine each chroma component using luma sample values.The CC-ALF is controlled by the (image) information of the bitstream,and the image information may include (a) information on the filtercoefficients for each chroma component and (b) information on a mask forcontrolling filter application to blocks of samples. The filtercoefficients may be signaled at the APS, and the block size and mask maybe signaled at the slice level.

Referring to FIG. 13, the CC-ALF may operate by applying a lineardiamond-shaped filter (FIG. 13B) to the luma channel for each chromacomponent. The filter coefficients are transmitted to the APS, scaled bya factor of 210, and rounded up for a fixed point representation. Theapplication of the filter may be controlled at a variable block size andsignaled by a context coding flag received for blocks of each sample.The block size along with the CC-ALF enable flag may be received at theslice level for each chroma component. The block size (for chromasamples) may be 16×16, 32×32, 64×64, or 128×128.

In the following embodiments, a method of re-filtering or modifyingreconstructed chroma samples filtered by the ALF based on reconstructedluma samples will be proposed.

An embodiment of the present disclosure relates to filter on/offtransmission and filter coefficient transmission among CC-ALFs. Asdescribed above, information (syntax element) in the syntax tabledisclosed in the present disclosure may be included in image/videoinformation, may be configured/encoded in the encoding apparatus andtransmitted to the decoding apparatus in the form of a bitstream. Thedecoding apparatus may parse/decode information (syntax element) in thecorresponding syntax table. The decoding apparatus may perform apicture/image/video decoding process (specifically, for example, theCCALF process) based on the decoded information. Hereinafter, the sameapplies to other embodiments.

According to an embodiment of the present disclosure, in order todetermine whether the CCALF is used (applied), a sequence parameter set(SPS) may include a CCALF enable flag (sps_ccalf_enable_flag). The CCALFenable flag may be transmitted independently of an ALF enabled flag(sps_alf_enabled_flag) for determining whether ALF is used (applied).

The following table shows exemplary syntax of the SPS according to thepresent embodiment

TABLE 3 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set_id u(4)  sps_video_parameter_set_id u(4) sps_max_sub_layers_minus1 u(3)  sps_reserved_zero_5bits u(5) profile_tier_level( sps_max_sub_layers_minus1 )  gdr_enabled_flag u(1) sps_seq_parameter_set_id ue(v)  chroma_format_idc ue(v)  if(chroma_format_idc = = 3 )   separate_colour_plane_flag u(1) pic_width_max_in_luma_samples ue(v)  pic_height_max_in_luma_samplesue(v)  subpics_present_flag u(1)  if( subpics_present_flag ) {  max_subpics_minus1 u(8)   subpic_grid_col_width_minus1 u(v)  subpic_grid_row_height_minus1 u(v)   for( i = 0; i <NumSubPicGridRows, i++ )    for( j = 0; j < NumSubPicGridCols, j++ )    subpic_grid_idx[ i ][ j ] u(v)   for( i = 0; i <= NumSubPics, i++ ){    subpic_treated_as_pic_flag[ i ] u(1)   loop_filter_across_subpic_enabled_flag[ i ] u(1)   }  } bit_depth_luma_minus8 ue(v)  bit_depth_chroma_minus8 ue(v) min_qp_prime_ts_minus4 ue(v)  log2_max_pic_order_cnt_lsb_minus4 ue(v) if( sps_max_sub_layers_minus1 > 0 )  sps_sub_layer_ordering_info_present_flag u(1)  for( i = (sps_sub_layer_ordering_info_present_flag ? 0 :  sps_maxsub_layers_minus1 );    i <= sps_max_sub_layers_minus1, i++ ) {  sps_max_dec_pic_buffering_minus1[ i ] ue(v)  sps_max_num_reorder_pics[ i ] ue(v)   sps_max_latency_increase_plus1[i ] ue(v)  }  long_term_ref_pics_flag u(1) inter_layer_ref_pics_present_flag u(1)  sps_idr_rpl_present_flag u(1) rpl1_same_as_rpl0_flag u(1)  for( i = 0; i < !rpl1_same_as_rpl0_flag ?2 : 1; i++ ) {   num_ref_pic_lists_in_sps[ i ] ue(v)   for( j = 0; j <num_ref_pic_lists_in_sps[ i ]; j++)    ref_pic_list_struct( i, j )  } if( ChromaArrayType != 0 )   qtbtt_dual_tree_intra_flag u(1) log2_ctu_size_minus5 u(2)  log2_min_luma_coding_block size_minus2 ue(v) partition_constraints_oventide_enabled_flag u(1) sps_log2_diff_min_qt_min_cb_intra_slice_luma ue(v) sps_log2_diff_min_qt_min_cb_inter_slice ue(v) sps_max_mtt_hierarchy_depth_inter_slice ue(v) sps_max_mtt_hierarchy_depth_intra_slice_luma ue(v)  if(sps_max_mtt_hierarchy_depth_intra_slice_luma != 0 ) {  sps_log2_diff_max_bt_min_qt_intra_slice_luma ue(v)  sps_log2_diff_max_tt_min_qt_intra_slice_luma ue(v)  }  if(sps_max_mtt_hierarchy_depth_inter_slices != 0 ) {  sps_log2_diff_max_bt_min_qt_inter_slice ue(v)  sps_log2_diff_max_tt_min_qt_inter_slice ue(v)  }  if(qtbtt_dual_tree_intra_flag ) {   sps_log2_diff_min_qt_min_cb_intraslice_chroma ue(v)   sps_max_mtt_hierarchy_depth_intra_slice_chromaue(v)   if ( sps_max_mtt_ hierarchy_depth_intra_slice_chroma != 0 ) {   sps_log2_diff_max_bt_min_qt_intra_slice_chroma ue(v)   sps_log2_diff_max_tt_min_qt_intra_slice_chroma ue(v)   }  } sps_max_luma_transform_size_64_flag u(1)  if( ChromaArrayType != 0 ) {  same_qp_table_for_chroma u(1)   for( i = 0; i <same_qp_table_for_chroma ? 1 : 3; i++ ) {   num_points_in_qp_table_minus1[ i ] ue(v)    for( j = 0; j <=num_points_in_qp_table_minus1[ i ]; j++ ) {     delta_qp_in_val_minus1[i ][ j ] ue(v)     delta_qp_out_val[ i ][ j ] ue(v)    }   }  } sps_weighted_pred_flag u(1)  sps_weighted_bipred_flag u(1) sps_sao_enabled_flag u(1)  sps_alf_enabled_flag u(1) sps_ccalf_enabled_flag u(1)  sps_transform_skip_enabled_flag u(1)  if(sps_transfom_skip_enabled_flag )   sps_bdpcm_enabled_flag u(1)  sps_joint_cbcr_enabled_flag u(1)  sps_ref_wraparound_enabled_flag u(1)  if(sps_ref_wraparound_enabled_flag )   sps_ref_wraparound_offset_minus1ue(v)  sps_temporal_mvp_enabled_flag u(1)  if(sps_temporal_mvp_enabled_flag )   sps_sbtmvp_enabled_flag u(1) sps_amvr_enabled_flag u(1)  sps_bdof_enabled_flag u(1) sps_smvd_enabled_flag u(1)  sps_dmvr_enabled_flag u(1)  if(sps_bdof_enabled_flag | | sps_dmvr_enabled_flag)  sps_bdof_dmvr_slice_present_flag u(1)  sps_mmvd_enabled_flag u(1) sps_isp_enabled_flag u(1)  sps_mrl_enabled_flag u(1) sps_mip_enabled_flag u(1)  if( ChromaArrayType != 0 )  sps_cclm_enabled_flag u(1)   if( sps_cclm_enabled_flag &&chroma_format_idc == 1 )   sps_cclm_colocated_chroma_flag u(1) sps_mts_enabled_flag u(1)  if( sps_mts_enabled_flag ) {  sps_explicit_mts_intra_enabled_flag u(1)  sps_explicit_mts_inter_enabled_flag u(1)  }  sps_sbt_enabled_flag u(1) if( sps_sbt_enabled_flag )   sps_sbt_max_size_64_flag u(1) sps_affine_enabled_flag u(1)  if( sps_affine_enabled_flag ) {  sps_affine_ type_flag u(1)   sps_affine_amvr_enabled_flag u(1)  sps_affine_prof_enabled_flag u(1)  }  if( chroma_format_idc = = 3 )  sps_palette_enabled_flag u(1)  sps_bcw_enabled_flag u(1) sps_ibc_enabled_flag u(1)  sps_ciip_enabled_flag u(1)  if(sps_mmvd_enabled_flag )   sps_fpel_mmvd_enabled_flag u(1) sps_triangle_enabled_flag u(1)  sps_lmcs_enabled_flag u(1) sps_lfnst_enabled_flag u(1)  sps_ladf_enabled_flag u(1)  if (sps_ladf_enabled_flag ) {   sps_num_ladf_intervals_minus2 u(2)  sps_ladf_lowest_interval_qp_offset se(v)   for( i = 0; i <sps_num_ladf_intervals_minus2 + 1; i++ ) {    sps_ladf_qp_offset[ i ]se(v)    sps_ladf_delta_threshold_minus1[ i ] ue(v)   }  } sps_scaling_list_enabled_flag u(1)  hrd_parameters_present_flag u(1) if( general_hrd_parameters_present_flag ) {   num_units_in_tick u(32)  time_scale u(32)   sub_layer_cpb_parameters_present_flag u(1)   if(sub_layer_cpb_parameters_present_flag )    general_hrd_parameters( 0,sps_max, sub_layers_minus1 )   else    general_hrd_parameters(sps_max_sub_layers_minus1,    sps_max_sub_layers_minus1 )  } vui_parameters_present_flag u(1)  if( vui_parameters_present_flag )  vui_parameters( )  sps_extension_flag u(1)  if( sps_extension_flag )  while( more_rbsp_data( ) )    sps_extension_data_flag u(1) rbsp_trailing_bits( ) }

The following table shows exemplary semantics regarding the CC-ALFenable flag included in the table. The CC-ALF enable flag may indicate(may be related to) whether the CC-ALF is enabled.

TABLE 4 sps_ccalf_enabled_flag equal to 0 specifies that the crosscomponent adaptive loop filter is disabled. sps_ccalf_enabled_flag equalto 1 specifies that the cross component adaptive loop filter is enabled.In another example of this embodiment, when the CC-ALF enable flag istransmitted, the condition for ChromaArrayType may be determined asshown in the following table.

TABLE 5 Descriptor seq_parameter_set_rbsp( ) { sps_decoding_parameter_set_id  u (4)  sps_video_parameter_set_id  u (4) sps_max_sub_layers_minus1  u (3)  sps_reserved_zero_5bits  u (5) profile_tier_level( sps_max_sub_layers_minus1 )  gdr_enabled_flag  u(1)  sps_seq_parameter_set_id ue (v)  chroma_format_idc ue (v)  if(chroma_format_idc = = 3 )   separate_colour_plane_flag  u (1) pic_width_max_in_luma_samples ue (v)  pic_height_max_in_luma_samples ue(v)  subpics_present_flag  u (1)  if( subpics_present_flag ) {  max_subpics_minus1  u (8)   subpic_grid_col_width_minus1  u (v)  subpic_grid_row_height_minus1  u (v)   for( i = 0; i <NumSubPicGridRows; i++ )    for( j = 0; j < NumSubPicGridCols; j++ )    subpic_grid_idx[ i ][ j ]  u (v)   for( i = 0; i <= NumSubPics; i++) {    subpic_treated_as_pic_flag[ i ]  u (1)   loop_filter_across_subpic_enabled_flag[ i ]  u (1)   }  } bit_depth_luma_minus8 ue (v)  bit_depth_chroma_minus8 ue (v) min_qp_prime_ts_minus4 ue (v)  log2_max_pic_order_cnt_lsb_minus4 ue (v) if( sps_max_sub_layers_minus1 > 0 )  sps_sub_layer_ordering_info_present_flag  u (1)  for( i =(sps_sub_layer_ordering_info_present_flag ? 0 : sps_max_sub_layers_minus1);   i <= sps_max_sub_layers_minus1; i++ ) {  sps_max_dec_pic_buffering_minus1[ i ] ue (v)  sps_max_num_reorder_pics[ i ] ue (v)   sps_max_latency_increase_plus1[i ] ue (v)  }  long_term_ref_pics_flag  u (1) inter_layer_ref_pics_present_flag  u (1)  sps_idr_rpl_present_flag  u(1)  rpl1_same_as_rpl0_flag  u (1)  for( i = 0; i <!rpl1_same_as_rpl0_flag ? 2 : 1; i++ ) }   num_ref_pic_lists_in_sps[ i ]ue (v)   for( j = 0; j < num_ref_pic_lists_in_sps[ i ]; j++ )ref_pic_list_struct( i, j )  }  if( ChromaArrag. Type != 0 )  qtbtt_dual_tree_intra_flag  u (1)  log2_ctu_size_minus5  u (2) log2_min_luma_coding_block_size_minus2 ue (v) partition_constraints_override_enabled_flag  u (1) sps_log2_diff_min_qt_min_cb_intra_slice_luma ue (v) sps_log2_diff_min_qt_min_cb_inter_slice ue (v) sps_max_mtt_hierarchy_depth_inter_slice ue (v) sps_max_mtt_hierarchy_depth_intra_slice_luma ue (v)  if(sps_max_mtt_hierarchy_depth_intra_slice_luma != 0 ) {  sps_log2_diff_max_bt_min_qt_intra_slice_luma ue (v)  sps_log2_diff_max_tt_min_qt_intra_slice_luma ue (v)  }  if(sps_max_mtt_hierarchy_depth_inter_slices != 0 ) {  sps_log2_diff_max_bt_min_qt_inter_slice ue (v)  sps_log2_diff_max_tt_min_qt_inter_slice ue (v)  }  if(qtbtt_dual_tree_intra_flag ) {  sps_log2_diff_min_qt_min_cb_intra_slice_chroma ue (v)  sps_max_mtt_hierarchy_depth_intra_slice_chroma ue (v)   if (sps_max_mtt_hierarchy_depthintra_slice_chroma != 0 ) {   sps_log2_diff_max_bt_min_qt_intra_slice_chroma uc (v)   sps_log2_diff_max_tt_min_qt_intra_slice_chroma ue (v)   }  } sps_max_luma_transform_size_64_flag  u (1)  if( ChromaArrayType != 0 ){   same_qp_table_for_chroma  u (1)   for( i = 0; i <same_qp_table_for_chroma ? 1 : 3; i++ ) {   num_points_in_qp_table_minus1[ i ] uc (v)    for( j = 0; j <=num_points_in_qp_table_minus1 [ i ]; j++ ) {     delta_qp_in_val_minus1[i ][ j ] ue (v)     delta_qp_out_val[ i ][ j ] ue (v)    }   }  } sps_weighted_pred_flag  u (1)  sps_weighted_bipred_flag  u (1) sps_sao_enabled_flag  u (1)  sps_alf_enabled_flag  u (1)  if(ChromaArrayType != 0 )   sps_ccalf_enabled_flag  u (1) sps_transform_skip_enabled_flag  u (1)  if(sps_transform_skip_enabled_flag )   sps_bdpcm_enabled_flag  u (1) sps_joint_cbcr_enabled_flag  u (1)  sps_ref_wraparound_enabled_flag  u(1)  if( sps_ref_wraparound_enabled_flag )  sps_ref_wraparound_offset_minus1 ue (v) sps_temporal_mvp_enabled_flag,  u (1)  if(sps_temporal_mvp_enabled_flag )   sps_sbtmvp_enabled_flag  u (1) sps_amvr_enabled_flag  u (1)  sps_bdof_enabled_flag  u (1) sps_smvd_enabled_flag  u (1)  sps_dmvr_enabled_flag  u (1)  if(sps_bdof_enabled_flag | | sps_dmvr_enabled_flag)  sps_bdof_dmvr_slice_present_flag  u (1)  sps_mmvd_enabled_flag  u (1) sps_isp_enabled_flag  u (1)  sps_mrl_enabled_flag  u (1) sps_mip_enabled_flag  u (1)  if( ChromaArrayType != 0 )  sps_cclm_enabled_flag  u (1)   if( sps_cclm_enabled_flag &&chroma_format_idc = = 1 )   sps_cclm_colocated_chroma_flag  u (1) sps_mts_enabled_flag  u (1)  if( sps_mts_enabled_flag ) {  sps_explicit_mts_intra_enabled_flag  u (1)  sps_explicit_mts_inter_enabled_flag  u (1)  }  sps_sbt_enabled_flag  u(1)  if( sps_sbt_enabled_flag )   sps_sbt_max_size_64_flag  u (1) sps_affine_enabled_flag  u (1)  if( sps_affine_enabled_flag ) {  sps_affine_type_flag  u (1)   sps_affine_amvr_enabled_flag  u (1)  sps_affine_prof_enabled_flag  u (1)  }  if( chroma_format_idc = = 3 ) sps_palette_enabled_flag  u (1)  sps_bcw_enabled_flag  u (1) sps_ibc_enabled_flag  u (1)  sps_ciip_enabled_flag  u (1)  if(sps_mmvd_enabled_flag )   sps_fpel_mmvd_enabled_flag  u (1) sps_triangle_enabled_flag  u (1)  sps_lmcs_enabled_flag  u (1) sps_lfnst_enabled_flag  u (1)  sps_ladf_enabled_flag  u (1)  if (sps_ladf_enabled_flag ) {   sps_num_ladf_intervals_minus2  u (2)  sps_ladf_lowest_interval_qp_offset se (v)   for( i = 0 i <sps_num_ladf_intervals_minus2 + 1; i++ ) {    sps_ladf_qp_offset[ i ] se(v)    sps_ladf_delta_threshold_minus1[ i ] ue (v)   }  } sps_scaling_list_enabled_flag  u (1)  hrd_parameters_present_flag  u(1)  if( general_hrd_parameters_present_flag ) {   num_units_in_tick  u(32)   time_scale  u (32)   sub_layer_cpb_parameters_present_flag  u (1)  if( sub_layer_cpb_parameters_present_flag)    general_hrd_parameters(0, sps_max_sub_layers_minus1 )   else    general_hrd_parameters(sps_max_sub_layers_minus1, sps_max_sub_layers_minus1 )  } vui_parameters_present_flag  u (1)  if( vui_parameters_present_flag)  vui_parameters( )  sps_extension_flag  u (1)  if( sps_extension_flag )  while( more_rbsp_data( ) )    sps_extension_data_flag  u (1) rbsp_trailing_bits( ) }

Referring to the table above, when ChromaArrayType is not 0, the SPS mayinclude the CC-ALF enable flag. For example, when ChromaArrayType is not0, the chroma format may not be monochrome, and in this case, the CCALFenable flag may be transmitted through the SPS.

The following table shows exemplary semantics of the CC-ALF enable flagincluded in the table.

TABLE 6 sps_ccalf_enabled_flag equal to 0 specifies that the crosscomponent adaptive loop filter is disabled. sps_ccalf_enabled_flag equalto 1 specifies that the cross component adaptive loop filter is enabled.

The image information may include the SPS. The SPS may include a firstALF enable flag (sps_alf_enabled_flag) related to whether the ALF isenabled. For example, based on the determination that a value of thefirst ALF enable flag is 1, the SPS may include a CCALF enable flagrelated to whether the cross-component filtering is enabled.

In an embodiment of the present disclosure, general constraintinformation for defining a profile and level may include a constraintflag for the CC-ALF. In one example, the syntax of the generalconstraint information may be expressed as in the following table.

TABLE 7 Descriptor general_constraint_info( ) { general_progressive_source_flag u (1)  general_interlaced_source_flag u(1)  general_non_packed_constrain_flag u (1) general_frame_only_constraint_flag u (1)  intro_only_constraint_flag u(1)  max_bitdepth_constraint_idc u (4)  max_chroma_format_constraint_idcu (2)  frame_only_constraint_flag u (1) no_qtbtt_dual_tree_intra_constraint_flag u (1) no_partition_constraints_override_constraint_flag u (1) no_sao_constraint_flag u (1)  no_alf_constraint_flag u (1) no_ccalf_constraint_flag u (1)  no_joint_cber_constraint_flag u (1) no_ref_wraparound_constraint_flag u (1) no_temporal_mvp_constraint_flag u (1)  no_sbtmvp_constraint_flag u (1) no_amvr_constraint_flag u (1)  no_bdof_constraint_flag u (1) no_dmvr_constraint_flag u (1)  no_cclm_constraint_flag u (1) no_mts_constraint_flag u (1)  no_sbt_constraint_flag u (1) no_affine_motion_constraint_flag u (1)  no_bcw_constraint_flag u (1) no_ibc_constraint_flag u (1)  no_ciip_constraint_flag u (1) no_fpel_mmvd_constraint_flag u (1)  no_triangle_constraint_flag u (1) no_ladf_constraint_flag u (1)  no_transform_skip_constraint_flag u (1) no_bdpcm_constraint_flag u (1)  no_qp_delta_constraint_flag u (1) no_dcp_quant_constraint_flag u (1)  no_sign_data_hiding_constraint_flagu (1)  // ADD reserved bits for future extensions  while( !byte_aligned() )   gci_alignment_zero_bit f (1) }

The following table shows exemplary semantics of the CC-ALF constraintflag included in the table.

TABLE 8 no_ccalf_enabled_flag equal to 1 specifies thatsps_ccalf_enabled_flag shall be equal to 0. no_ccalf_constraint_flagequal to 0 does not impose a constraint.

The image information may include the general constraint information.For example, the general constraint information may include a CCALFconstraint flag for constraining the cross-component filtering based onthe value of the CCALF enable flag included in the SPS. When the valueof the CCALF constraint flag is 0, the CCALF constraint may not beapplied. The CCALF constraint flag having a value of 1 may indicate thatthe value of the CCALF enable flag included in the SPS is 0.

According to an embodiment of the present disclosure, aslice_cross_component_alf_cb_enabled_flag flag may be added in unit ofslices to determine whether the CC-ALF is used. Theslice_cross_component_alf_cb_enabled_flag flag may be transmitted whenthe sps_ccalf_enabled_flag flag is 1. Alternatively, theslice_ccalf_enable_flag flag may be transmitted when thesps_ccalf_enabled_flag flag is 1 and ChromaArrayType is not 0.

For example, when the slice_cross_component_alf_cb_enabled_flag flagvalue is 1, the syntaxslice_cross_component_alf_cb_reuse_temporal_layer_filter may beadditionally transmitted. When this syntax value is 0, the syntaxslice_cross_component_alf_cb_aps_id may be transmitted. Theslice_cross_component_alf_cb_log_2_control_size_minus4 syntax for theblock size for CC-ALF may be transmitted.

The following table is an exemplary syntax of slice header informationaccording to the above-described embodiment.

TABLE 9 Descriptor slice_header( ) {  slice_pic_parameter_set_id ue (v) if( rect_slice_flag | | NumBricksInPic > 1 )   slice_address  u (v) if( !rect_slice_flag && !single_brick_per_slice_flag )  num_bricks_in_slice_minus1 uc (v)  non_reference_picture_flag  u (1) slice_type ue (v)  if( separate_colour_plane_flag = = 1 )  colour_plane_id  u (2)  slice_pic_order_cnt_lsb  u (v)  if(nal_unit_type = = GDR_NUT )   recovery_poc_cnt ue (v)  if( nal_unit_type= = IDR_W_RADL | | nal_unit_type = = IDR_N_LP | |   nal_unit_type = =CRA_NUT | | NalUnitType = = GDR_NUT )   no_output_of_prior_pics_flag  u(1)  if( output_flag_present_flag )   pic_output_flag  u (1)  if( (nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP ) | |   sps_idr_rpl_present_flag ) {   for( i = 0; i < 2; i++ ) {    if(num_ref_pic_lists_in_sps[ i ] > 0 && !pps_ref_pic_list_sps_idc[ i ] &&        ( i = = 0 | | ( i = = 1 && rpl1_idx_present_flag ) ) )    ref_pic_list_sps_flag[ i ]  u (1)    if( ref_pic_list_sps_flag[ i ]{     if( num_ref_pic_lists_in_sps[ i ] > 1 &&        (i = = 0 | | ( i == 1 && rpl1_idx_present_flag ) ) )       ref_pic_list_idx[ i ]  u (v)   } else     ref_pic_list_struct( i, num_ref_pic_lists_in_sps[ i ] )   for(j = 0; j < NumLtrpEntries[ i ][ RplsIdx[ i ] ]; j++ ) {     if(ltrp_in_slice_fteader_flag[ i ][ RplsIdx[ i ] ] )      slice_poc_lsb_lt[i ][ j ]  u (v)     delta_poc_msb_present_flag[ i ][ j ]  u (1)     if(delta_poc_msb_present_flag[ i ][ j ] )      delta_poc_msb_cycle_lt[ i ][j ] ue (v)    }   }   if ( ( slice_type != I && num_ref_entries[ 0 ][RplsIdx[ 0 ] ] > 1 ) | |    ( slice_type = = B && num_ref_entries[ 1 ][RplsIdx[ 1 ] ] > 1 ) ) {    num_ref_idx_adive_override_flag  u (1)   if( num_ref_idx_active_override_flag )     for( i = 0; i < (slice_type = = B ? 2: 1 ); i++ )      if( num_ref_entries[ i ][ RplsIdx[i ] ] > 1 ) num_ref_idx_active_minus1[ i ] ue (v)   }  }  if(partition_constraints_override_enabled_flag ) {  partition_constraints_override_flag ue (v)   if(partition_constraints_override_flag ) {   slice_log2_diff_min_qt_min_cb_luma ue (v)   slice_max_mtt_hierarchy_depth_luma ue (v)    if(slice_max_mtt_hierarchy_depth_luma != 0 )    slice_log2_diff_max_bt_min_qt_luma ue (v)    slice_log2_diff_max_tt_min_qt_luma ue (v)    }    if( slice_type = =I && qtbtt_dual_tree_intra_flag ) {    slice_log2_diff_min_qt_min_cb_chroma ue (v)    slice_max_mtt_hierarchy_depth_chroma uc (v)     if(slice_max_mtt_hierarchy_depth_chroma != 0 )     slice_log2_diff_max_ht_min_qt_chroma ue (v)     slice_log2_diff_max_tt_min_qt_chroma ue (v)     }    }   }  }  if (slice_type != I ) {   if( sps_temporal_mvp_enabled_flag &&!pps_temporal_mvp_enabled_idc )    slice_temporal_mvp_enabled_flag  u(1)   if( slice_type = = B && !pps_mvd_l1_zero_idc )    mvd_l1_zero_flag u (1)   if( cabac_init_present_flag )    cabac_init_flag  u (1)   if(slice_temporal_mvp_enabled_flag ) {    if( slice_type = = B &&!pps_collocated_from_l0_idc )     collocated_from_l0_flag  u (1)    if(( collocated_from_l0_flag && NumRefldxActive [ 0 ] > 1 ) | |     (!collocated_from_l0_flag && NumRefidxActive[ 1 ] > 1 ) )    collocated_ref_idx ue (v)   }   if( ( pps_weighted_pred_flag &&slice_type = = P ) | |    ( pps_weighted_bipred_flag && slice_type = = B) )    pred_weight_table( )   if(!pps_six_minus_max_num_merge_cand_plus1 )   six_minus_max_num_merge_cand  u (v)   if( sps_affine_enabled_flag &&    !pps_five_minus_max_num_subblock_merge_cand_plus1 )   five_minus_max_num_subblock_merge_cand ue (v)   if(sps_fpel_mmvd_enabled_flag )    slice_fpel_mmvd_enabled_flag  u (1)  if( sps_bdof_dmvr_slice_present_flag )    slice_disable_bdof_dmvr_flag u (1)   if( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 &&    !pps_max_num_merge_cand_minus_max_num_triangle_card_minus1 )   max_num_merge_cand_minus_max_num_triangle_cand ue (v)  }  if (sps_ibc_enabled_flag )   slice_six_minus_max_num_ibc_merge_cand ue (v) if( sps_joint_cbcr_enabled_flag )   slice_joint_cbcr_sign_flag  u (1) slice_qp_delta se (v)  if( pps_slice_chroma_qp_offsets_present_flag ) {  slice_cb_qp_offset se (v)   slice_cr_qp_offset se (v)   if(sps_joint_cbcr_enabled_flag )    slice_joint_cbcr_qp_offset se (v)  } if( sps_sao_enabled_flag ) {   slice_sao_luma_flag  u (1)   if(ChromaArrayType != 0 )    slice_sao_chroma_flag  u (1)  }  if(sps_alf_enabled_flag ) {   slice_alf_enabled_flag  u (I)   if(slice_alf_enabled_flag ) {    slice_num_alf_aps_ids_luma  u (3)    for(i = 0; i < slice_num_alf_aps_ids_luma; i++ )     slice_alf_aps_id_luma[i ]  u (3)    if( ChromaArrayType != 0 )     slice_alf_chroma_idc  u (2)   if( slice_alf_chroma_idc )     slice_alf_aps_id_chroma  u (3)   }  } if( sps_ccalf_enabled_flag ) {  slice_cross_component_alf_cb_enabled_flag  u (1)   if(slice_cross_component_alf_cb_enabled_flag ) {   slice_cross_component_alf_cb_reuse_temporal_layer_filter  u (1)    if(!slice_cross_component_alf_cb_reuse_temporal_layer_filter )    slice_cross_component_alf_cb_aps_id  u (5)   slice_cross_component_alf_cb_log2_control_size_minus4 ue (v)   }  slice_cross_component_alf_cr_enabled_flag  u (1)   if(slice_cross_component_alf_cr_enabled_flag ) {   slice_cross_component_alf_ct_reuse_temporal_layer_filter  u (1)    if(!slice_cross_component_alf_cr_reuse_temporal_layer_filter )    slice_cross_component_alf_cr_aps_id  u (5)   slice_cross_component_alf_cr_log2_control_size_minus4 ue (v)   } }  dep_quant_enabled_flag  u (1)  if( !dep_quant_enabled_flag )  sign_data_hiding_enabled_flag  u (1)  if(deblocking_filter_override_enabled_flag )  deblocking_filter_override_flag  u (1)  if(deblocking_filter_override_flag ) {  slice_deblocking_filter_disabled_flag  u (1)   if(!slice_deblocking_filter_disabled_flag ) {   slice_beta_offset_div2 se(v)   slice_tc_offset_div2 se (v)   }  }  if( sps_lmcs_enabled_flag ) {  slice_lmcs_enabled_flag  u (1)   if( slice_lmcs_enabled_flag ) {   slice_lmcs_aps_id  u (2)    if( ChromaArrayType != 0 )    slice_chroma_residual_scale_flag  u (1)   }  }  if(sps_scaling_list_enabled_flag ) {   slice_scaling_list_present_flag  u(1)   if( slice_scaling_list_present_flag )    slice_scaling_list_aps_id u (3)  }  if( entry_point_offsets_present_flag && NumEntryPoints > 0 ){   offset_len_minus1 ue (v)   for( i = 0; 1 < NumEntryPoints; i++ )   entry_point_offset_minus1[ i ]  u (v)  }  if(slice_header_extension_present_flag ) {   slice_header_extension_lengthue (v)   for( i = 0; i < slice_header_extension_length; i++ )   slice_header_extension_data_byte[ i ]  u (8)  }  byte_alignment( ) }

The following table shows exemplary semantics for syntax elementsincluded in the table.

TABLE 10 slice_cross_component_alf_cb_enabled_flag equal to 0 specifiesthat the cross-component Cb filter is not applied to Cb colour componentslice_cross_component_alf_cb_enabled_flag equal to 1 indicates that thecross-component Cb filter is applied to the Cb colour component.slice_cross_component_alf_cr_enabled_flag equal to 0 specifies that thecross-component Cr filter is not applied to Cr colour component.slice_cross_component_alf_cb_enabled_flag equal to 1 indicates that thecross-component Cr filter is applied to the Cr colour component.slice_cross_component_alf_cb_reuse_temporal_layer_filter equal to 1specifies that the cross component Cb filter coefficients, with j =0..13, inclusive is set equal to AlfCCTemporalCoeff_(Cb)[ TemporalId ][j ]. slice_cross_component_alf_cb_reuse_temporal_layer_filter equal to 0and slice_cross_component_alf_cb_enabled_flag is equal to 1 specifiesthat the syntax element slice_cross_component_alf_cb_aps_id is presentin slice header. When slice_cross_component_alf_cb_enabled_flag is equalto 1, and slice_cross_component_alf_cb_reuse_temporal_layer_filter isequal to 0, the elements of AlfCCTemporalCoeff_(Cb)[ TemporalId ][ j ],with j = 0..13 are derived as follows: AlfCCTemporalCoeff_(Cb)[TemporalId ][ j ] = AlfCCCoeff_(Cb)[ slice_cross_component_alf_cb_aps_id][ j ] slice_cross_component_alf_cr_reuse_temporal_layer_filter equal to1 specifies that the cross- component Cr filter coefficients, with j =0..13, inclusive is set equal to AlfCCTemporalCoeff_(Cr)[ TemporalId ][j ]. slice_cross_component_alf_cr_reuse_temporal_layer_filter equal to 0and slice_cross_component_alf_cr_enabled_flag is equal to 1 specifiesthat the syntax element slice_cross_component_alf_cr_aps_id is presentin slice header. When slice_cross_component_alf_cr_enabled_flag is equalto 1, and slice_cross_component_alf_cr_reuse_temporal_layer_filter isequal to 0, the elements of AlfCCTemporalCoeff_(Cr)[ TemporalId ][ j ],with j = 0..13 are derived as follows: AlfCCTemporalCoeff_(Cr)[TemporalId ][ j ] = AlfCCCoeff_(Cr)[ slice_cross_component_alf_cr_aps_id][ j ] slice_cross_component_alf_cb_aps_id specifies theadaptation_parameter_set_id that the Cb colour component of the slicerefers to for cross-component Cb filter. Whenslice_cross_component_alf_cb_aps_id is not present it is inferred to beequal to slice_alf_aps_id_luma[ 0 ]. The TemporalId of the ALF APS NALunit having adaptation_parameter_set_id equal toslice_cross_component_alf_cb_aps_id shall be less than or equal to theTemporalId of the coded slice NAL unit.slice_cross_component_alf_cr_aps_id specifies thealaptation_parameter_set_id that the Cr colour component of the slicerefers to for cross-component Cr filter. Whenslice_cross_component_alf_cr_aps_id is not present it is inferred to beequal to slice_alf_aps_id_luma[ 0 ]. The TemporalId of the ALF APS NALunit having aclaptation_parameter_set_id equal toslice_cross_component_alf_cr_aps_id shall be less than or equal to theTemporalId of the coded slice NAL unit.slice_cross_component_alf_cb_log2_control_size_minus4 specifies thevalue of the square block sizes in number of samples as follows:AlfCCSamplesCbW = AlfCCSamplesCbH =2^(( slice)_cross_component_alf_cb_log2_control_size_minus4 ⁺ ⁴ ⁾slice_cross_component_alf_cb_log2_control_size_minus4 shall be in therange 0 to 3, inclusive.slice_cross_component_alf_cr_log2_control_size_minus4 specifies thevalue of the square block sizes in number of samples as follows:AlfCCSamplesCrW = AlfCCSamplesCrH =2^(( slice cross component alf cr log2 control size minus4 −) ⁴ ⁾slice_cross_component_alf_cr_log2_control_size_minus4 shall be in therange 0 to 3, inclusive.

According to an embodiment of the present disclosure, aslice_ccalf_enable_flag flag may be added in unit of slices to determinewhether the CC-ALF is used. The slice_ccalf_enable_flag flag may betransmitted when the sps_ccalf_enabled_flag flag is 1. Alternatively,the slice_ccalf_enable_flag flag may be transmitted when thesps_ccalf_enabled_flag flag is 1 and ChromaArrayType is not 0.

For example, when the slice_ccalf_enable_flag flag value is 1,slice_ccalf_chroma_idc syntax and slice_ccalf_aps_id_chroma syntax maybe additionally transmitted. The slice_ccalf_chroma_idc syntax indicateswhether Cb or Cr is applied or not, and the slice_ccalf_aps_id_chromasyntax indicates the APS id referenced for the corresponding sliceCC-ALF.

The following table shows the syntax of slice header informationaccording to the present embodiment.

TABLE 11 Descriptor slice_header() {  slice_pic_parameter_set_id ue (v) if( rect_slice_flag | | NumBrieksInPic > 1 )   slice_address  u (v) if( !rect_slice_flag && !single_brick_per_slice_flag )  num_bricks_in_slice_minus1 ue (v)  non_reference_picture_flag  u (1) slice_type ue (v)  if( separate_colour_plane_flag = = 1 )  colour_plane_id  u (2)  slice_pic_order_cnt_lsb  u (v)  if(nal_unit_type = = GDR_NUT )   recoveq_poc_cnt ue (v)  if( nal_unit_type= = IDR_W_RADL | | nal_unit_type = = IDR_N_LP | |   nal_unit_type = =CRA NUT | | NalUnitType = = GDR NUT )   no_output_of_prior_pics_flag  u(1)  if( output_flag_present_flag )   pic_output_flag  u (1)  if( (nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP ) | |   sps_idr_rpl_present_flag ) {   for( i = 0; i < 2; i++ ) {    if(num_ref_pic_lists_in_sps[ 1 ] > 0 && !pps_ref_pic_list_sps_idc[ i ] &&        (i = = 0 | | (i = = 1 && rpl1_idx_present_flag ) ) )    ref_pic_list_sps_flag[ i ]  u (1)    if( ref_pic_list_sps_flag[ i ]){     if( num_ref_pic_lists_in_sps[ i ] > 1 &&        (i = = 0 | | (i == 1 && rpl1_idx_present_flag ) ) )       ref_pic_list_idx[ i ]  u (v)   } else     ref_pic_list_struct( i, num_ref_pic_lists_in_sps[ i ] )   for( j = 0; j < NumLtrpEntries[ i ][ RplsIdx[ i ] ]; j++ ) {     if(ltrp_in_slice_header_flag[ i ][ RpIsIdx[ i ] ] )      slice_poc_lsb_lt[i ][ j ]  u (v)     delta_poc_msb_present_flag[ i ][ j ]  u (1)     if(delta_poc_msb_present_flag[ i ][ j ])      delta_poc_msb_cycle_lt[ i ][j ] ue (v)    }   }   if( ( slice_type != I && num_ref_entries[ 0 ][RplsIdx[ 0 ] ] > 1 ) | |    ( slice_type = = B && num_ref_entries[ 1 ][RplsIdx[ 1 ] ] > 1 ) ) {    num_ref_idx_active_override_flag  u (1)   if( num_ref_idx_active_override_flag )     for( i = 0; i < (slice_type = = B? 2: 1 ); i++ )      if( num_ref_entries[ i ][ RplsIdx[i ] > 1 )       num_ref_idx_active_minus1[ i ] ue (v)   }  }  if(partition_constraints_override_enabled_flag ) {  partition_constraints_override_flag ue (v)   if(partition_constraints_override_flag ) {   slice_log2_diff_min_qt_min_cb_luma ue (v)   slice_max_mtt_hierarchy_depth_luma ue (v)    if(slice_max_mtt_hierarchy_depth_luma != 0 )    slice_log2_diff_max_bt_min_qt_luma. ue (v)    slice_log2_diff_max_tt_min_qt_luma ue (v)    }    if( slice_type = =I && qtbtt_dual_tree_intra_flag ) {    slice_log2_diff_min_qt_min_cb_chroma ue (v)    slice_max_mtt_hierarchy_depth_chroma ue (v)     if(slice_max_mtt_hierarchy_depth_chroma != 0 )     slice_log2_diff_max_bt_min_qt_chroma ue (v)     slice_log2_diff_max_tt_min_qt_chroma ue (v)     }    }   }  }  if(slice_type != I ) {   if( sps_temporal_mvp_enabled_flag &&!pps_temporal_mvp_enabled_idc )    slice_temporal_mvp_enabled_flag  u(1)   if( slice_type = = B && !pps_mvd_l1_zero_idc )    mvd_l1_zero_flag u (1)   if( cabac_init_present_flag )    cabac_init_flag  u (1)   if(slice_temporal_mvp_enabled_flag ) {    if( slice_type = = B &&!pps_collocated_from_l0_idc )     collocated_from_l0_flag  u (1)    if(( collocated_from_l0_flag && NumRefIdxActive[ 0 ] > 1 ) | |     (!collocaled_from_l0_flag && NumRefIdxActive[ 1 ] > 1 ) )    collocated_ref_idx ue (v)   }   if( ( pps_weighted_pred_flag &&slice_type = = P ) | |    ( pps_weighted_bipred_flag && slice_type = = B) )    pred_weight_table( )   if( tppssix_minus_max_num_merge_cand_plus1 )    six_minus_max_num_merge_cand ue(v)   if( sps_affine_enabled_flag &&    !pps_five_minus_max_num_subblock_merge_cand_plus1 )   five_minus_max_num_subblock_merge_cand ue (v)   if(sps_fpel_mmwd_enabled_flag )    slice_fpel_mmvd_enabled_flag  u (1)  if( sps_bdof_dmvr_slice_present_flag )    slice_disable_bdof_dmvr_flag u (1)   if( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 &&    !pps_max_nuna_inerge_cand_minus_max_num_triangle_cand_minus1 )   max_num_merge_cand_minus_max_num_triangle_cand ue (v)  }  if (sps_ibc_enabled_flag )   slice_six_minus_max_num_ibc_merge_cand ue (v) if( sps_joint_cbcr_enabled_flag )   slice_joint_cbcr_sign_flag  u (1) slice_qp_delta se (v)  if( pps_slice_chroma_qp_offsets_present_flag ) {  slice_cb_qp_offset se (v)   slice_cr_qp_offset se (v)   if(sps_joint_cbcr_enabled_flag )    slice_joint_cbcr_qp_offset se (v)  } if( sps_sao_enabled_flag ) {   slice_sao_luma_flag  u (1)   if(ChromaArrayType != 0 )    slice_sao_chroma_flag  u (1)  }  if(sps_alf_enabled_flag {   slice_alf_enabled_flag  u (1)   if(slice_alf_enabled_flag ) {    slice_num_alf_aps_ids_luma  u (3)    for(i = 0; i < slice_num_alf_aps_ids_luma; i++ )     slice_alf_aps_id_luma[i ]  u (3)    if( ChromaArrayType != 0 )     slice_alf_chroma_idc  u (2)   if( slice_alf_chroma_idc )     slice_alf_aps_id_chroma  u (3)   }  } if( sps_ccalf_enabled_flag ) {   slice_ccalf_enabled_flag  u (1)   if(slice_ccalf_enabled_flag ) {    if( ChromaArrayType != 0 )    slice_ccalf_chroma_idc  u (2)    if( slice_ccalf_chroma_idc )    slice_ccalf_aps_id_chroma  u (3)   }  }   dep_quiant_enabled_flag  u(1)  if( !dep_quant_enabled_flag )   sign_data_hiding_enabled_flag  u(1)  if( deblocking_filter_override_enabled_flag )  deblocking_filter_override_flag  u (1)  if(deblocking_filter_override_flag ) {  slice_deblocking_filter_disabled_flag  u (1)   if(!slice_deblocking_filter_disabled_flag ) {   slice_beta_offset_div2 se(v)   slice_tc_offset_div2 se (v)   }  }  if( sps_lmcs_enabled_flag ) {  slice_lmcs_enabled_flag  u (1)   if( slice_lmcs_enabled_flag ) {   slice_lmcs_aps_id  u (2)    if( ChromaArrayType != 0 )    slice_chroma_residual_scale_flag  u (1)   }  }  if(sps_scaling_list_enabled_flag ) {   slice_scaling_list_present_flag  u(1)   if( slice_scaling_list_present_flag )    slice_scaling_list_aps_id u (3)  }  if( entry_point_offsets_present_flag && NumEnt Points > 0 ) {  offset_len_minus1 ue (v)   for( i = 0; i NumEntryPoints; i++ )   entry_point_offset_minus1  u (v) if(slice_header_extension_present_flag ) {   slice_header_extension_lengthue (v)   for( i = 0 i < slice_header_extension_length, i++ )   slice_header_extension_data_byte[ i ][ j ]  u (8)  }  byte_alignment() }

The following table shows semantics for syntax elements included in thetable.

TABLE 12 slice_ccalf_enabled_flag equal to 1 specifies that crosscomponent adaptive loop filter is enabled and may be applied to Cb, orCr colour component in a slice. slice_ccalf_enabled_flag equal to 0specifies that cross component adaptive loop filter is disabled for allcolour components in a slice. slice_ccalf_chroma_idc equal to 0specifies that the cross component adaptive loop filter is not appliedto Cb and Cr colour components. slice_ccalf_chroma_idc equal to 1indicates that the cross component adaptive loop filter is applied tothe Cb colour component. slice_ccalf_chroma_idc equal to 2 indicatesthat the cross component adaptive loop filter is applied to the Crcolour component. slice_ccalf_chroma_idc equal to 3 indicates that thecross component adaptive loop filter is applied to Cb and Cr colourcomponents. When slice_ccalf_chroma_idc is not present, it is inferredto be equal to 0. slice_ccalf_aps_id_chroma specifies theadaptation_parameter_set_id of the CCALF APS that the chroma componentof the slice refers to. The TemporalId of the APS NAL unit havingaps_params_type equal to CC_ALF_APS and adaptation_parameter_set_idequal to slice_ccalf_aps_id_chroma shall be less than or equal to theTemporalId of the coded slice NAL unit. For infra slices and slices inan TRAP picture, slice_ccalf_aps_id_chroma shall not refer to an CCALFAPS associated with other pictures rather than the picture containingthe intra slices or the IRAP picture.

Alternatively, the syntax element slice_ccalf_chroma_idc in the abovetable may be described based on the semantics shown in the table below.

TABLE 13 slice_ccalf_chroma_idc equal to 0 indicates that the crosscomponent adaptive loop filter is applied to the Cb colour component.slice_ccalf_chroma_idc equal to 1 indicates that the cross componentadaptive loop filter is applied to the Cr colour component.slice_ccalf_chroma_idc equal to 2 indicates that the cross componentadaptive loop filter is applied to Cb and Cr colour components. Whenslice_ccalf_chroma _idc is not present, it is inferred to be equal to 0.

According to an embodiment of the present disclosure, the CC-ALF may beperformed without an additional enable flag (or similar informationthereto) at the slice level. The following table shows some syntax ofslice header information according to the present embodiment.

TABLE 14 if( sps_ccalf_enablcd_flag ) {  if( ChromaArrayType != 0)  slice_ccalf_chroma_idc u(2)  if( slice_ccalf_chroma_idc )  slice_ccalf_aps_id_chroma u(3) }

The following table shows the semantics of the syntax elements includedin the table.

TABLE 15 slice_ccalf_chroma_idc equal to 0 specifies that the crosscomponent adaptive loop filter is not applied to Cb and Cr colourcomponents. slice_ccalf_chroma_idc equal to 1 indicates that the crosscomponent adaptive loop filter is applied to the Cb colour componentslice_ccalf_chroma_idc equal to 2 indicates that the cross componentadaptive loop filter is applied to the Cr colour component.slice_ccalf_chroma_idc equal to 3 indicates that the cross componentadaptive loop filter is applied to Cb and Cr colour components. Whenslice_ccalf_chroma_idc is not present. it is inferred to be equal to 0.slice_ccalf_aps_id_chroma specifies the adaptation_parameter_set_id ofthe CCALF APS that the chroma component of the slice refers to. TheTemporalId of the APS NAL unit having aps_params_type equal toCC_ALF_APS and adaptation_parameter_set_id equal toslice_ccalf_aps_id_chroma shall be less than or equal to the TemporalIdof the coded slice NAL unit. For intra slices and slices in an IRAPpicture, slice_ccalf_aps_id_chroma shall not refer to an CCALF APSassociated with other pictures rather than the picture containing theinfra slices or the IRAP picture.

According to an embodiment of the present disclosure, a syntax elementslice_ccalf_chroma_idc may be included in slice header information basedon a condition for ChromaArrayType. The following table shows somesyntax of slice header information according to the present embodiment.

TABLE 16 if( sps_ccalf_enablcd_flag && ChromaArrayType != 0) {  if(ChromaArrayType != 0)   slice_ccalf_chroma_idc u(2)  if(slice_ccalf_chroma_idc )   slice_ccalf_aps_id_chroma u(3) }

In an example, the header information (slice header( )) includes a firstflag (slice_cross_component_alf_cb_enabeld_flag orsh_cc_alf_cb_enabeld_flag) related to whether the CCALF is enabled for aCb color component of the filtered reconstructed chroma samples, and asecond flag (slice_cross_component_alf_cr_enabeld_flag orsh_cc_alf_cr_enabeld_flag) related to whether the CCALF is available fora Cr color component of the filtered reconstructed chroma samples.

In an example, based on the determination that the value of the firstflag (slice_cross_component_alf_cb_enabeld_flag orsh_cc_alf_cb_enabeld_flag) is 1, the header information may includeinformation (slice_cross_cb_aps_id_id or sh_cc_alf_cb_aps_id) related toan identifier of an APS for deriving the cross-component filtercoefficients for the Cb color component.

In one example, based on the determination that the value of the secondflag (slice_cross_component_alf_cr_enabeld_flag orsh_cc_alf_cr_enabeld_flag) is 1, the header information may includeinformation (slice_cross_component_id_cross_component_id_flag orsh_cc_alf_cr_aps_id) related to the identifier of the APS for derivationof the cross-component filter coefficients for the Cr color component.

According to an embodiment of the present disclosure, thecross-component filter coefficients for the CC-ALF may be transmittedthrough the APS. In one example, the APS for the CC-ALF may be defined.

The following table shows exemplary syntax of the APS according to thepresent embodiment.

TABLE 17 Descriptor adaptation_parameter_set_rbsp( ) { adaptation_parameter_set_id u(5)  aps_params_type u(3)  if(aps_params_type = = ALF_APS )   alf_data( )  else if( aps_params_type == LMCS_APS )   lmcs_data( )  else if( aps_params_type = = SCALING_APS )  scaling_list_data( )  else if( aps_params_type = = CCALF_APS )  ccalf_data( )  aps_extension_flag u(1)  if( aps_extension_flag )  while( more_rbsp_data( ) )    aps_extension_data_flag u(1) rbsp_trailing_bits( ) }

In the above table, alf_data( ) may be called general ALF data, andccalf_data( ) may be called the CCALF data. The ALF data may includegeneral ALF data and/or CCALF data. In one example, the ALF data may bethe same as the CCALF data. In another example, the ALF data may bedifferent from the CCALF data.

The following table shows the semantics of the syntax elements includedin the table

The ALF data according to the embodiment of the present disclosure maybe expressed in the syntax as shown in the following table.

TABLE 19 Descriptor ccalf_data( adaptation_parameter_set_id ) { alf_cross_component_cb_filter_signal_flag u(l) alf_cross_component_cr_filter_signal_flag u(l)  if(alf_cross_component_cb_filter_signal_flag ) {  alf_cross_component_cb_min_eg_order_minus1 ue(v)   for( i = 0; 1 < 3i++ )    alf_cross_component_cb_eg_order_increase_flag[ i ] u(l)   for (j = 0; j < 14; j++ ) {    alf_cross_component_cb_coeff_abs[ j ] uek(v)   if( alf_cross_component_cb_coeff_abs[ j ])    alf_cross_component_cb_coeff_sign[ j ] u(l)   }  }  if(alf_cross_component_cr_filter_signal_flag) {  alf_cross_component_cr_min_eg_order_minus1 ue(v)   for( i = 0; i < 3;i++ )    alf_cross_component_cr_eg_order_increase_flag[ i ] u(l)   for (j = 0; j < 14; j++ ) {    alf_cross_component_cr_coeff_abs[ j ] uek(v)   if( alf_cross_component_cr_coeff_abs[ j ]    alf_cross_component_cr_coeff_sign[ j ] u(l)   }  } }

The semantics of the syntax elements included in the table may beexpressed as shown in the following table.

TABLE 20 alf cross_component_cb_filter_signal_flag equal to 1 specifiesthat a cross-component Cb filter set is sig- nalled.alf_cross_component_cb_filter_signal_flag equal to 0 specifies that across component Cb filter set is not signalled. Whenalf_cross_component_cb_filter_signal_flag is not present it is inferredto be equal 0. alf_cross_component_cr_filter_signal_flag equal to 1specifies that a cross component Cr filter set is signalledalf_cross_component_cr_filter_signal_flag equal to 0 specifies that across-component Cr filter set is not signalled. Whenalf_cross_component_cr_filter_signal_flag is not present, it is inferredto be equal 0. alf_cross_component_cb_min_eg_order_minus1 plus 1specifies the minimum order of the exp-Golomb code for cross-componentCb filter coefficient signalling. The value ofalf_cross_component_cb_min_eg_order_minus1 shall be in the range of 0 to9, inclusive. alf_cross_component_cb_eg_order_increase_flag[ i ] equalto 1 specifies that the minimum order of the exp- Golomb code forcross-component Cb filter coefficient signalling is incremented by 1.alf_cross_component_cb_eg_order_increase_flag[ i ] equal to 0 specifiesthat the minimum order of the exp- Golomb code for cross-component Cbfilter coefficient signalling is not incremented by 1. The orderexpGoOrderCb[ i ] of the exp-Golomb code used to decode the values ofalf_cross_component_cb_coeff_abs[ j ] is derived as follows: expGoOrderCb[ i ] = ( i = = 0 ? alfcross_component_cb_min_eg_order_minus1 + 1 : expGoOrderCb[ i − 1 ]) +alf_cross_component_cb_eg_order increase_flag[ i ].alf_cross_component_cb_coeff_abs[ j ] specifies the absolute value ofthe j-th coefficient of the signalled cross-component Cb filter. Whenalf_cross_component_cb_coeff_abs[ j ] is not present, it is inferred tobe equal 0. The order k of the exp-Golomb binarization uek(v) is derivedas follows:  golombOrderIdxCb[ ] = {0,2,2,2,1,2,2,2,2,2,2,1,2,1} [thesemay be Categorize coefficient into 3 categories, each category uses thesame order k exp-Golomb code] alf_cross_component_cb_coeff_sign[ j ]specifies the sign of the j-th cross-component Cb filter coefficient asfollows:  If alf_cross_component_cb_coeff_sign[ j ] is equal to 0, thecorresponding cross-component Cb filter coefficient has a positivevalue.  Otherwise(alf_cross_component_cb_coeff_sign[ j] is equal to 1),the corresponding cross-component Cb filter coefficient has a negativevalue.  When alf_cross_component_cb_coeff_sign[ j ] is not present it isinferred to be equal to 0.  The cross-component Cb filter coefficientsAlfCCCoeffCb[ adaptation_parameter_set_id] with elements AlfCCCoeffCb[adaptation_parameter_set_id ][ j ], with j = 0..13 are derived asfollows:  AlfCCCoeff adaptation_parameter set_id ][ j ] =alf_cross_component_cb_coeff_abs[ j ] *   ( 1 − 2 *alf_cross_component_cb_coeff_sign[ j ]) It is a requirement of bitstreamconformance that the values of AlfCCCoeffCb[ adaptation_parameter_set_id][j ] with j = 0..13 shall be in the range of −210 − 1 to 210 − 1,inclusive. alf_cross_component_cr_min_eg_order_minus1 plus 1 specifiesthe minimum order of the exp-Golomb code for cross-component Cr filtercoefficient signalling. The value ofalf_cross_component_cr_min_eg_order_minus1 shall be in the range of 0 to9, inclusive alf_cross_component_cr_eg_order_increase_flag[ i ] equal to1 specifies that the minimum order of the exp- Golomb code forcross-component Cr filter coefficient signalling is incremented by 1.alf_cross_component_cr_eg_order_increase_flag[ i ] equal to 0 specifiesthat the minimum order of the exp- Golomb code for cross-component Crfilter coefficient signalling is not incremented by 1. The orderexpGoOrderCb[ i ] of the exp-Golomb code used to decode the values ofalf_cross_component_cb_coeff_abs[ j ] is derived as follows: expGoOrderCr[ i ] = ( i = = 0 ?alf_cross_component_cr_min_eg_order_minus1 + 1 : expGoOrderCr[ i − 1]) + alf_cross_component_cr_eg_order_increase_flag[ i ].alf_cross_component_cr_coefr_abs[ j ] specifies the absolute value ofthe j-th coefficient of the signalled cross-component Cr filter. Whenalf_cross_component_cr_coeff abs[ j ] is not present, it is inferred tobe equal 0.  The order k of the exp-Golomb binarization uek(v) isderived as follows.  golombOrderIdxCr[ ] = {0,1,2,1,0,1,2,2,2,2,2,1,2,1}[these may be Categorize coefficient into 3 categories, each categoryuses the same order k exp-Golomb code]alf_cross_component_cr_coeff_sign[ j ] specifies the sign of the j-thcross-component Cr filter coefficient as follows:  Ifalf_cross_component_cr_coeff sign[ j ] is equal to 0, the correspondingcross-component Cr filter coefficient has a positive value.  Otherwise(alf_cross_component_cr_coeff_sign[ j ] is equal to 1), thecorresponding cross-component Cr filter coefficient has a negativevalue.  When alf_cross_component_cr_coeff sign[ j ] is not present, itis inferred to be equal to 0.  The cross-component Cr filtercoefficients AlfCCCoeffCr[ adaptation_parameter_set_id ] with elementsAlfCCCoeffCr[ adaptation_parameter_set_id ][ j ], with j = 0..13 arederived as follows:  AlfCCCoeffCr[ adaptation_parameter_set_id ][ j ] =alf_cross_component_cr_coeff_abs[ j ] *   ( 1 − 2 *alf_cross_component_cr_coeff_sign[ j ]) It is a requirement of bitstreamconformance that the values of AlfCCCoeffCr[ adaptation_parameter_set_id1 ][ j ] with j =0..13 shall be in the range of −210 − 1 to 210 − 1,inclusive.

In another example, the syntax related to the ALF data may be expressedas shown in the following table.

TABLE 21 Descriptor ccalf_data( adaptation_parameter_set_id ) { alf_cross_component_cb_fifter_signal_flag u(1) alf_cross_component_cr_filter_signal_flag u(1)  if(alf_cross_component_cb_filter_signal_flag ) {   for ( j = 0; j < 14; j++) {    alf_cross_component_cb_coeff_abs[ j ] uek(v)    if(alf_cross_component_cb_coeff_abs[ j ] )    alf_cross_component_cb_coeff_sign[ j ] u(1)   }  }  if(alf_cross_component_cr_filter_signal_flag ) {   for ( j = 0; j < 14: j++) {    alf_cross_component_cr_coeff_abs[ j ] uek(v)    if(alf_cross_component_cr_coeff_abs[ j ])    alf_cross_component_cr_coeff_sign[ j ] u(1)   }  } }

The semantics of the syntax elements included in the table may be asshown in the following table.

TABLE 22 alf_cross_component_cb_filter_signal_flag equal to 1 specifiesthat a cross-component Cb filter set is sig- nalledalf_cross_component_cb_filter_signal_flag equal to 0 specifies that across component Cb filter set is not signalled. Whenalf_cross_component_cb_filter_signal_flag is not present it is inferredto be equal 0. alf_cross_component_cr_filter_signal_flag equal to 1specifies that a cross-component Cr filter set is signalledalf_cross_component_cr filter_signal_flag equal to 0 specifies that across-component Cr filter set is not signalled. Whenalf_cross_component_cr_filter_signal_flag is not present, it is inferredto be equal 0. alf_cross_component_cb_coeff_abs[ j ] specifies theabsolute value of the j-th coefficient of the signalled cross-componentCb filter. When alf_cross_component_cb_coeff abs[ j 1] is not present,it is inferred to be equal 0.  The order k of the exp-Golombbinarization uek(v) is set equal to 3.alf_cross_component_cb_coeff_sign[ j ] specifies the sign of the j-thcross-component Cb filter coefficient as follows:  Ifalf_cross_component_cb_coeff_sign[ j ] is equal to 0 the correspondingcross-component Cb filter coefficient has a positive value.  Otherwise(alf_cross_component_cb_coeff sign[ j ] is equal to 1), thecorresponding cross-component Cb filter coefficient has a negativevalue.  When alf_cross_component_cb_coeff_sign[ j ] is not present, itis inferred to be equal to 0.  The cross-component Cb filtercoefficients AlfCCCoeffCb[ adaptation_parameter_set_id ] with elementsAlfCCCoeffCb[ adaptation_parameter_set_id ][ j ], with j = 0..13 arederived as follows:  AlfCCCoeffCb[ adaptation_parameter_set_id ][ j ] =alf_cross_component_cb_coeff_abs [ j ] *   ( 1 − 2 *alf_cross_component_cb_coeff_sign [ j ]) It is a requirement ofbitstream conformance that the values of AlfCCCoeffCb[adaptation_parameter_set_id ][ j ] with j − 0..13 shall be in the rangeof −210 − 1 to 210 − 1, inclusive. alf_cross_component_cr_coeff_abs [ j] specifies the absolute value of the j-th coefficient of the signalledcross-component Cr filter. When alf_cross component_cr_coeff_abs[ j ] isnot present, it is inferred to be equal 0.  The order k of theexp-Golomb binarization uek(v) is set equal to 3.alf_cross_component_cr_coeff_sign[ j ] specifies the sign of the j-thcross-component Cr filter coefficient as follows:  Ifalf_cross_component_cr_coeff sign[ j ] is equal to 0, the correspondingcross-component Cr filter coefficient has a positive value.  Otherwise(alf_cross_component_cr_coeff sign[ j ] is equal to 1), thecorresponding cross-component Cr filter coefficient has a negativevalue.  When alf_cross_component_cr_coeff_sign[ j ] is not present it isinferred to be equal to 0. The cross-component Cr filter coefficientsAlfCCCoeffCr[ adaptation_parameter_set_id ] with elements AlfCCCoeffCr[adaptation_parameter_set_id ][ j ], with j = 0..13 are derived asfollows:  AlfCCCoeffCr[ adaptation_parameter_set_id ][ j ] =alf_cross_component_cr_coeff abs[ j ] *   ( 1 − 2 *alf_cross_component_cr_coeff_sign[ j ]) It is a requirement of bitstreamconformance that the values of AlfCCCoeffCr[ adaptation_parameter_set_id][ j ] with j = 0..13 shall be in the range of −210 − 1 to 210 − 1,inclusive.

In the table, the order of exp-Golomb binarization for parsing thealf_cross_component_cb_coeff_abs[j] andalf_cross_component_cr_coeff_abs[j] syntax may be defined as one of 0 to9 values.

In another example, the syntax related to the ALF data may be expressedas shown in the following table.

TABLE 23 Descriptor ccalf_data( adaptation_parameter_set_id ) { alf_cross_component_cb_filter_signal_flag u(1) alf_cross_component_cr_filter_signal_flag u(1)  if(alf_cross_component_cr_filter_signal_flag ) {  ccalf_cb_num_alt_filters_minus1 ue(k)   for(altIdx = 0; altIdx <=ccalf_cb_num_alt_filters_minus1; altIdx++) {    for ( j = 0; j < 14; j++) {     alf_cross_component_cb_coeff_abs[ j ] uek(v)     if(alf_cross_component_cb_coeff_abs[ j ] )     alf_cross_component_cb_coeff_sign[ j ] u(1)    }   }  }  if(alf_cross_component_cr_ftlter_signal_flag ) {  ccalf_cr_num_alt_filters_minus1 ue(k)   for(altIdx = 0, altldx <=ccalf_cr_num_alt_filters_minus1; altIdx++) {    for ( j = 0; j < 14; j++) {     alf_cross_component_cr_coeff_abs[ j ] uek(v)     if(alf_cross_component_cr_coeff_abst[ j ] )     alf_cross_component_cr_coeff_sign[ j ] u(1)    }   }  } }

In the table, information related to absolute values of the filtercoefficients and/or information related to signs of the filtercoefficients may be expressed as a quadratic vector, a quadratic matrix,or a quadratic array (eg, alf_cross_component_cb_coeff_abs[altIdx][j],alf_cross_component_cb_coeff_sign[altIdx][j],alf_cross_component_cr_coeff_abs[altIdx][j],alf_cross_component_cr_coeff_sign[altIdx][j]). In an example, theinformation on the number of filters, the information related to theabsolute values of the filter coefficients, and/or the informationrelated to signs of the filter coefficients may be included in thegeneral ALF data.

The semantics of the syntax elements included in the table may be asshown in the following table.

TABLE 24 alf_cross_component_cb_filter signal_flag equal to 1 specifiesthat a cross-component Cb filter set is sig- nalled.alf_cross_component_cb_filter_signal_flag equal to 0 specifies that across-component Cb filter set is not signalled. Whenalf_cross_component_cb_filter_signal_flag is not present, it is inferredto be equal 0. alf_cross_component_cr_filter_signal_flag equal to 1specifies that a cross-component Cr filter set is sig- nalled.alf_cross_component_cr_filter_signal_flag equal to 0 specifies that across-component Cr filter set is not signalled. Whenalf_cross_component_cr_filter_signal_flag is not present, it is inferredto be equal 0. alf_cb_num_alt_filters_minus1 plus 1 specifies the numberof alternative cross component adaptive loop filters for cb components.alf_cross_component_cb_coeff_abs[ j ] specifies the absolute value ofthe j-th coefficient of the signalled cross-component Cb filter. Whenalf_cross_component_cb_coeff abs[ j ] is not present, it is inferred tobe equal 0.  The order k of the exp-Golomb binarization uek(v) is setequal to 3. alf_cross_component_cb_coeff_sign[ j ] specifies the sign ofthe j-th cross-component Cb filter coefficient as follows:  Ifalf_cross_component_cb_coeff_sign[ j ] is equal to 0, the correspondingcross-component Cb filter coefficient has a positive value.  Otherwise(alf_cross_component_cb_coeff_sign[ j ] is equal to 1), thecorresponding cross-component Cb filter coefficient has a negativevalue.  When alf_cross_component cb_coeff_sign[ j ] is not present, itis inferred to be equal to 0. The cross-component Cb filter coefficientsAlfCCCoeffCb[ adaptation_parameter_set_id ] with elements AlfCCCoeffCb[adaptation_parameter_set_id ][ j ], with j = 0..13 are derived asfollows:  AlfCCCoeffCb[ adaptation_parameter_set_id ][ j ]=alf_cross_component_cb_coeff_abs[ j ] *   ( 1 − 2 *alf_cross_component_cb_coeff sign[ j ] ) It is a requirement ofbitstream conformance that the values of AlfCCCoeffCb[adaptation_parameter_set_id ][ j ] with j = 0..13 shall be in the rangeof −210 − 1 to 210 − 1, inclusive. alf_cr_num_alt_filters_minus1 plus 1specifies the number of alternative cross component adaptive loopfilters for cr components. alf_cross_component_cr_coeff_abs[ j ]specifies the absolute value of the j-th coefficient of the signalledcross-component Cr filter. When alf_cross_component_cr_coeff_abs[ j ] isnot present, it is inferred to be equal 0.  The order k of theexp-Golomb binarization uek(v) is set equal to 3.alf_cross_component_cr_coeff_sign[ j ] specifies the sign of the j-thcross-component Cr filter coefficient as follows:  Ifalf_cross_component_cr_coeff_sign[ j ] is equal to 0, the correspondingcross-component Cr filter coefficient has a positive value.  Otherwise(alf_cross_component_cr_coeff_sign[ j ] is equal to 1), thecorresponding cross-component Cr filter coefficient has a negativevalue.  When alf_cross_component_cr_coeff_sign[ j ] is not present, itis inferred to be equal to 0.  The cross-component Cr filtercoefficients AlfCCCoeffCr[ adaptation_parameter_set_id ] with elementsAlfCCCoeffCr[ adaptation_parameter_set_id ][ j ], with j = 0..13 arederived as follows:  AlfCCCoeffCr[ adaptation_parameter_set_id ][ j ] =alf_cross_component_cr_coeff_abs[ j ] *   ( 1 − 2 *alf_cross_component_cr_coeff_sign[ j ] ) It is a requirement ofbitstream conformance that the values of AlfCCCoeffCr[adaptation_parameter_set_id ][ j ] with j = 0..13 skill be in the rangeof −210 − 1 to 210 − 1, inclusive.

The order of exp-Golomb binarization for parsing thealf_cross_component_cb_coeff_abs[j] andalf_cross_component_cr_coeff_abs[j] syntax may be defined as one of 0 to9 values.

The cross-component filter coefficients may be called the CCALF filtercoefficients. The cross-component filter coefficients may include thecross-component filter coefficients for the Cb color component and thecross-component filter coefficients for the Cr color component. Theinformation on the values of the cross-component filter coefficients forthe Cb color component (Cr color component) may include the informationon the values of the cross-component filter coefficients for the Cbcolor component (Cr color component) and/or the information on the signsof the cross-component filter coefficients for the Cb color component(Cr color component).

In one example, the ALF data included in the APS for deriving thecross-component filter coefficients for the Cb color component mayinclude a Cb filter signal flag(alf_cross_component_cb_filter_signal_flag oralf_cc_cb_filter_signal_flag) related to whether the cross-componentfilters for the Cb color component are signaled. Based on the Cb filtersignal flag, the ALF data included in the APS for deriving thecross-component filter coefficients for the Cb color component mayinclude the information (ccalf_cb_num_alt_filters_minus1 oralf_cc_cb_filters_signalled_minus1) related to the number ofcross-component filters for the Cb color component. Based on theinformation related to the number of cross-component filters for the Cbcolor component, the ALF data included in the APS for deriving thecross-component filter coefficients for the Cb color component mayinclude the information (alf_cross_component_cb_coeff_abs oralf_cc_cb_mapped_coeff_abs) on the absolute values of thecross-component filter coefficients for the Cb color component and theinformation (alf_cross_component_cb_coeff_sign or alf_cc_cb_coeff_sign)on the signs of the cross-component filter coefficients for the Cb colorcomponent. The cross-component filter coefficients (ccalfcoeff orccalfapscoeff) for the Cb color component may be derived based on theinformation on the absolute values of the cross-component filtercoefficients for the Cb color component and the information on the signsof the cross-component filter coefficients for the Cb color component.For example, the information related to the number of cross-componentfilters for the Cb color component may be zero-order exponential Golomb(0^(th) EG, ue(v) or ue(k)) coded.

In one example, the ALF data included in the APS for deriving thecross-component filter coefficients for the Cr color component mayinclude a Cr filter signal flag(alf_cross_component_cr_filter_signal_flag oralf_cc_cr_filter_signal_flag) related to whether the cross-componentfilters for the Cr color component are signaled. Based on the Cr filtersignal flag, the ALF data included in the APS for deriving thecross-component filter coefficients for the Cr color component mayinclude the information (ccalf_cr_num_alt_filters_minus1 oralf_cc_cr_filters_signalled_minus1) related to the number ofcross-component filters for the Cr color component. Based on theinformation related to the number of cross-component filters for the Crcolor component, the ALF data included in the APS for deriving thecross-component filter coefficients for the Cr color component mayinclude the information (alf_cross_component_cr_coeff_abs oralf_cc_cr_mapped_coeff_abs) on the absolute values of thecross-component filter coefficients for the Cr color component and theinformation (alf_cross_component_cr_coeff_sign or alf_cc_cr_coeff_sign)on the signs of the cross-component filter coefficients for the Cr colorcomponent. The cross-component filter coefficients (ccalfcoeff orccalfapscoeff) for the Cr color component may be derived based on theinformation on the absolute values of the cross-component filtercoefficients for the Cr color component and the information on the signsof the cross-component filter coefficients for the Cr color component.For example, the information related to the number of cross-componentfilters for the Cr color component may be zero-order exponential Golomb(0^(th) EG, ue(v) or ue(k)) coded.

According to an embodiment of the present disclosure, the CC-ALF relatedinformation may be transmitted in units of CTU (block) to control filteron/off of the CC-ALF.

The following table shows exemplary syntax for a coding tree unitaccording to the present embodiment.

TABLE 25 Descriptor coding_tree_unit( ) {  xCtb = ( CtbAddrIhRs %PicWidthInCtbsY ) << CtbLog2SizeY  yCtb = ( CtbAddrInRs /PicWidthInCtbsY ) << CtbLog2SizeY  if( slice_sao_luma_flag ||slice_sao_chroma_flag )   sao( xCtb >> CtbLog2SizeY, yCtb >>CtbLog2SizeY )  if( slice_alf_enabled_flag ){   alf_ctb_flag[ 0 ][xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ] ae(v)   if( alf_ctb_flag[ 0 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]) {    if(slice_num_alf_aps_ids_luma > 0 )     alf_ctb_use_first_aps_flag ae(v)   if( !alf_ctb_use_first_aps_flag ) {     if(slice_num_alf_aps_ids_luma > 1 )      alf_use_aps_flag ae(v )     if(alf_use_aps_flag ) ) {      if( slice_num_alf_aps_ids_luma > 2 )      alf_luma_prev_filter_idx_minus1 ae(v)     } else     alf_luma_fixed_filter_idx ae(v)    }   }   if( slice_alf_chroma_idc= = I || slice_alf_chroma_idc = = 3 ) {    alf_ctb_flag[ 1 ][ xCtb >>CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ] ae(v)    if( alf_ctb_flag[ 1 ][xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]     &&aps_alf_chroma_num_alt_filters_minus1 > 0 )     alf_ctb_filter_alt_idx[0 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ] ae(v)   }   if(slice_all_chroma_idc = = 2 || slice_alf_chroma_idc = = 3) {   alf_ctb_flag[ 2 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]ae(v)    if( alf_ctb_flag[2 ][ xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ]     && aps_alf_chroma_num_alt_filters_minust1 > 0 )    alf_ctb_filter_alt_idx[ 1 ] [xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ] ae(v)   }  }  if( slice_ccalf_enabled_flag ){   if(slice_ccalf_chroma_idc = = 1 || slice_ccalf_chrorna_idc = = 3 )   ccalf_ctb_flag[ 0 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]ae(v)   if( slice_ccalf chroma_idc ==2 1 1 slice_ccalf chroma_idc ==3 )   ccalf_ctb_flag[ 1 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]ae(v)  }  if( slice_type = = I && qtbtt_dual_tree_intra_flag )  dual_tree_implicit_qt_split ( xCtb, yCtb, CtbSizeY, 0 )  else   codingtree( xCtb, yCtb, CtbSizeY, CtbSizeY, 1, 1, 0, 0, 0, 0, 0,   SINGLE_TREE, MODE_TYPE_ALL ) }

The following table shows exemplary semantics of syntax elementsincluded in the table.

TABLE 26 ccalf_ctb_flag[ chromaIdx ] [ xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ] equal to 1 specifies that the cross component adaptiveloop filter is applied to the coding tree block of the chroma componentindicated by chromaIdx, equal to 0 for Cb and equal 1 for Cr, of thecoding tree unit at luma location ( xCtb, yCtb ). ccaff_ctb_flag[chromaIdx ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ] equal to 0specifies that the adaptive loop filter is not applied to the codingtree block of the chroma component indicated by chromaIdx of the codingtree unit at luma location ( xCtb, yCtb ). When ccalf ctb_flag[ cIdx ][xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ] is not present, it isinferred to be equal to 0.

In another example of the present embodiment, the syntax regarding thecoding tree unit may be expressed as the following table.

Descriptor coding_tree_unit( ) {  xCtb = ( CtbAddrInRs % PicWidthInCtbsY) << CtbLog2SizeY  yClb = ( CtbAddrIntRs / PicWidthInCtbsY ) <<CtbLog2SizeY  if( slice_sao_luma_flag || slice_sao_chroma_flag )   sao(xCtb >> CtbLog2SizeY, yCtb >> CtbLog2SizeY )  if( slice_alf enabled_flag){   alf_ctb_flag[ 0 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]ae(v)   if( alf_ctb_flag[ 0 ][ xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ]) {    if( slice_num_alf_aps_ids_luma > 0 )    alf_ctb_use_first_aps_flag ae(v)    if( !alf_ctb_use_first_aps_flag){     if( slice_num_alf_aps_ids_luma > 1 )      alf_use_aps_flag ae(v)    if( alf use_aps_flag ) {      if( slice_num_alf_aps_ids_luma > 2 )      alf_luma_prev_filter_idx_minusl ae(v)     } else     alf_luma_fixed_filter_idx ae(v)    }   }   if( slice_alf_chroma_idc= = 1 || slice_alf_chroma_idc == 3) {    alf_ctb_flag[ 1 ][ xCtb >>CtbLog2SizeY ][ yCtb >> CtbLog2SizeY] ae(v)    if( alf_ctb_flag[1 ][xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]     &&aps_alf_chroma_num_alt_filters_minus1 > 0 )     alf_ctb_filter_alt_idx[0 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ] ae(v)   }   if(slice_alf_chroma_idc = = 2 || slice_alf_chroma_idc = = 3 ) {   alf_ctb_flag[ 2 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]ae(v)    if( alf_ctb_flag[ 2 ][ xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ]     && aps_alf_chroma_num_alt_filters_minus1 > 0 )    alf_ctb_filter_alt_idx[ 1 ][ xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ] ae(v)   }  }  if( slice_ccalf_enabled_flag ){   if(slice_ccalf_chroma_idc = = 1 || slice_ccalf_chroma_idc = = 3 ) {   ccalf_ctb_flag[ 0 ][ xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]ae(v)    if( ccalf_ctb_flag[ 0 ][ xCtb >> CtbLog2SizeY ][ yCtb >>0CtbLog2SizeY ]     && aps_alf_chroma_num_alt_filters_minus1 > 0 )    ccalf_ctb_filter_alt_idx[ 0 ][ xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ] ae(v)   }   if( slice_ccalf_chroma_idc = = 2 ||slice_ccalf_chroma_idc = = 3 ) {    ccalf_ctb_flag[ 1 ][ xCtb >>CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ] ae(v)    if( ccalf_ctb_flag[ 1 ][xCtb >> CtbLog2SizeY ][ yCtb >> CtbLog2SizeY ]     &&aps_alf_chroma_num_alt_filters_minus1 > 0 )    ccalf_ctb_filter_alt_idx[ 1 ][ xCtb >> CtbLog2SizeY ][ yCtb >>CtbLog2SizeY ] ae(v)   }  }  if( slice_type = =I &&qtbtt_dual_tree_intra_flag )   dual_tree_implicit_qt_split ( xCtb, yCtb,CtbSizeY, 0)  else   coding_tree( xCtb, yCtb, CtbSizeY, CtbSiteY, 1, 1,0, 0, 0, 0, 0,         SINGLE_TREE, MODE_TYPE_ALL ) }

The following table shows exemplary semantics of syntax elementsincluded in the table.

TABLE 28 ccalf_ctb_flag[ chromaldx ] [ xCtb >> CtbLog2SizeY ] [ yCtb >>CtbLog2SizeY ] equal to 1 specifies that the cross component adaptiveloop filter is applied to the coding tree block of the chroma componentindicated by chromaIdx, equal to 0 for Cb and equal 1 for Cr, of thecoding tree unit at luma location ( xCtb, yCtb ). ccalf_ctb_flag[ cIdx ][ xCtb >> CtbLog2SizeY ] [ yCtb >> CtbLog2SizeY ] equal to 0 specifiesthat the adaptive loop filter is not applied to the coding tree block ofthe chrorna component indicated by chromaldx of the coding tree unit atluma location ( xCtb, yCtb ).  When ccalf_ctb_flag[ cIdx ] [ xCtb >>CtbLog2SizeY ] [ yCtb >> CtbLog2SizeY ] is not present, it is inferredto be equal to 0. ccalf_ctb_filter_alt_idx[ chromaIdx ] [ xCtb >>CtbLog2SizeY ] [ yCtb >> CtbLog2SizeY ] specifies the index of thealternative cross component adaptive loop filter applied to the codingtree block of the chroma component, with chromaIdx equal to 0 for Cb andchromaIdx equal 1 for Cr, of the coding tree unit at luma location (xCtb, yCtb ). When ccalf_ctb_filter_alt_idxf chromaIdx ] [ xCtb >>CtbLog2SizeY ] [ yCtb >> CtbLog2SizeY ] is not present, it is infered tobe equal to zero.

In an example, the image information may include the information on thecoding tree unit (coding_tree_unit( )). The information on the codingtree unit may include the information (ccalf_ctb_flag[0]) on whether thecross-component filter is applied to the current block of the Cb colorcomponent, and/or the information (ccalf_ctb_flag[1]) on whether thecross-component filter is applied to the current block of the Cr colorcomponent. In addition, the information on the coding tree unit mayinclude the information (ccalf_ctb_filter_alt_idx[0]) on the filter setindex of the cross-component filter applied to the current block of theCb color component, and/or the information (ccalf_ctb_filter_alt_idx[1])on the filter set index of the cross-component filter applied to thecurrent block of the Cr color component.

FIGS. 14 and 15 are diagrams schematically illustrating an example of avideo/image encoding method and related components according toembodiment(s) of the present disclosure. The method disclosed in FIG. 14may be performed by the encoding apparatus disclosed in FIG. 2.Specifically, for example, S1400 of FIG. 14 may be performed by theadder 250 of the encoding apparatus, S1410 to S1440 may be performed bythe filtering unit 260 of the encoding apparatus, and S1450 may beperformed by the entropy encoding unit 240 of the encoding apparatus.The method disclosed in FIG. 14 may include the embodiments describedabove in the present disclosure.

Referring to FIG. 14, the encoding apparatus may generate reconstructedluma samples and reconstructed chroma samples of the current block(S1400). The encoding apparatus may generate the residual luma samplesand/or the residual chroma samples. The encoding apparatus may generatethe reconstructed luma samples based on the residual luma samples andmay generate the reconstructed chroma samples based on the residualchroma samples.

In an example, the residual samples for the current block may begenerated based on the original samples and the prediction samples ofthe current block. Specifically, the encoding apparatus may generate theprediction samples of the current block based on the prediction mode. Inthis case, various prediction methods disclosed in the presentdisclosure, such as the inter prediction or the intra prediction, may beapplied. The residual samples may be generated based on the predictionsamples and the original samples.

In one example, the encoding apparatus may generate the residual lumasamples. The residual luma samples may be generated based on theoriginal luma samples and the predicted luma samples. In one example,the encoding apparatus may generate the residual chroma samples. Theresidual chroma samples may be generated based on the original chromasamples and the predicted chroma samples.

The encoding apparatus may derive the transform coefficients. Theencoding apparatus may derive the transform coefficients based on thetransform process for the residual samples. The encoding apparatus mayderive the transform coefficients (luma transform coefficients) for theresidual luma samples and/or the transform coefficients (chromatransform coefficients) for the residual chroma samples. For example,the transform process may include at least one of DCT, DST, GBT, or CNT.

The encoding apparatus may derive the (quantized) transformcoefficients. The encoding apparatus may derive the quantized transformcoefficients based on the quantization process for the transformcoefficients. The quantized transform coefficients may have aone-dimensional vector form based on a coefficient scan order. Thequantized transform coefficients may include the quantized lumatransform coefficients and/or the quantized chroma transformcoefficients.

The encoding apparatus may generate the residual information. Theencoding apparatus may generate the residual information indicating(including) the quantized transform coefficients. The residualinformation may be generated through various encoding methods such asexponential Golomb, CAVLC, and CABAC.

The encoding apparatus may generate prediction-related information. Theencoding apparatus may generate the prediction-related information basedon the prediction samples and/or a mode applied to the predictionsamples. The prediction-related information may include information onvarious prediction modes (e.g., merge mode, MVP mode, etc.), MVDinformation, and the like.

The encoding apparatus may derive the ALF filter coefficients for theALF process (S1410). The ALF filter coefficients may include the ALFluma filter coefficients for the reconstructed luma samples and the ALFchroma filter coefficients for the reconstructed chroma samples. Thefiltered reconstructed luma samples and/or the filtered reconstructedchroma samples may be generated based on the ALF filter coefficients.

The encoding apparatus may generate ALF-related information (S1420). Theencoding apparatus may generate the ALF-related information based on theALF filter coefficients. The encoding apparatus derives an ALF-relatedparameter, which may be applied for filtering on the reconstructedsamples, and generates the ALF-related information. For example, theALF-related information may include the ALF-related informationdescribed above in the present disclosure.

The encoding apparatus may derive cross-component filters (CCALF filter)and/or cross-component filter coefficients (CCALF filter coefficients)(S1430). The cross-component filters and/or cross-component filtercoefficients may be used in the CCALF process. The modified filteredreconstructed chroma samples may be generated based on thecross-component filters and/or the cross-component filter coefficients.

The encoding apparatus may generate the cross-componentfiltering-related information (or CCALF-related information) (S1440). Inan example, the cross-component filtering-related information mayinclude information on the number of cross-component filters andinformation on the cross-component filter coefficients. Thecross-component filters may include cross-component filters for the Cbcolor component and cross-component filters for the Cr color component.

In an example, the cross-component filtering-related information mayinclude a CCALF enable flag, a flag related to whether a CCALF isenabled for the Cb (or Cr) color component, a Cb (or Cr) filter signalflag related to whether cross-component filters for the Cb (or Cr) colorcomponent are signaled, information on the number of cross-componentfilters for the Cb (or Cr) color component, information on the values ofthe cross-component filter coefficients for the Cb (or Cr) colorcomponent, information on the absolute values of the cross-componentfilter coefficients for the Cb (or Cr) color component, information onthe signs of the cross-component filter coefficients for the Cb (or Cr)color component, and/or information on whether the cross-componentfilter is applied to the current block of the Cb (or Cr) color componentin the information about the coding tree unit (coding tree unit syntax).

The encoding apparatus may encode video/image information (S1450). Theimage information may include the residual information and/or theALF-related information. The encoded video/image information may beoutput in the form of the bitstream. The bitstream may be transmitted tothe decoding apparatus through a network or a storage medium.

The image/video information may include various information according tothe embodiment of the present disclosure. For example, the image/videoinformation may include information disclosed in at least one of Tables1 to 28 described above.

In an embodiment, the image information may include a first adaptationparameter set (APS) including first ALF data and a second APS includingsecond ALF data. The first ALF data may include information on thenumber of cross-component filters for the Cb color component. The secondALF data may include information on the number of cross-componentfilters for the Cr color component.

In an embodiment, the image information may include header informationand an adaptation parameter set (APS). The header information may beslice header information. The slice header information may includeinformation related to an identifier of an APS including ALF data. Forexample, the cross-component filter coefficients may be derived based onthe ALF data.

In an embodiment, the image information may include a sequence parameterset (SPS). The SPS may include the CCALF enable flag related to whetherthe cross-component filtering is enabled. For example, based on theCC-ALF enable flag, ID information of adaptation parameter sets (APSs)including the ALF data used for the derivation of the cross-componentfilter coefficients for the CC-ALF may be derived.

In an embodiment, the image information may include general constraintinformation. For example, the general constraint information may includea CCALF constraint flag for constraining the cross-component filteringbased on the value of the CCALF enable flag included in the SPS. Whenthe value of the CCALF constraint flag is 0, the CCALF constraint maynot be applied. The CCALF constraint flag having a value of 1 mayindicate that the value of the CCALF enable flag included in the SPS is0.

In an embodiment, the slice header information may include a first flagrelated to whether the CCALF is enabled for the Cb color component ofthe filtered reconstructed chroma samples, and a second flag related towhether the CCALF is enabled for the Cr color component of the filteredreconstructed chroma samples.

In an embodiment, the image information may include the adaptationparameter sets (APSs). In an example, based on the determination thatthe value of the first flag is 1, the slice header information mayinclude ID information of a first APS including first ALF data used forthe derivation of the cross-component filter coefficients for the Cbcolor component. In an example, based on the determination that thevalue of the first flag is 1, the slice header information may includeID information of a second APS including second ALF data used for thederivation of the cross-component filter coefficients for the Cr colorcomponent.

In an embodiment, the first ALF data may include a Cb filter signal flagrelated to whether the cross-component filters for the Cb colorcomponent are signaled. Based on the Cb filter signal flag, the firstALF data may include information related to the number ofcross-component filters for the Cb color component. Based on theinformation related to the number of cross-component filters for the Cbcolor component, the first ALF data may include the information on theabsolute values of the cross-component filter coefficients for the Cbcolor component and the information on the signs of the cross-componentfilter coefficients for the Cb color component. Based on the informationon the absolute values of the cross-component filter coefficients forthe Cb color component and the information on the signs of thecross-component filter coefficients for the Cb color component, thecross-component filter coefficients for the Cb color component may bederived.

In an embodiment, the information related to the number ofcross-component filters for the Cb color component may be zero-orderexponential Golomb (0^(th) EG) coded.

In an embodiment, the second ALF data may include a Cr filter signalflag related to whether the cross-component filters for the Cr colorcomponent are signaled. Based on the Cr filter signal flag, the secondALF data may include information related to the number ofcross-component filters for the Cr color component. Based on theinformation related to the number of cross-component filters for the Crcolor component, the second ALF data may include the information on theabsolute values of the cross-component filter coefficients for the Crcolor component and the information on the signs of the cross-componentfilter coefficients for the Cr color component. Based on the informationon the absolute values of the cross-component filter coefficients forthe Cr color component and the information on the signs of thecross-component filter coefficients for the Cr color component, thecross-component filter coefficients for the Cr color component may bederived.

In an embodiment, the information related to the number ofcross-component filters for the Cr color component may be zero-orderexponential Golomb (0^(th) EG) coded.

In an embodiment, the image information may include the information onthe coding tree unit. The information on the coding tree unit mayinclude the information on whether the cross-component filter is appliedto the current block of the Cb color component and/or the informationrelated to whether the cross-component filter is applied to the currentblock of the Cr color component.

In an embodiment, the information on the coding tree unit may includeinformation on a filter set index of the cross-component filter appliedto the current block of the Cb color component, and/or the informationon the filter set index of the cross-component filter applied to thecurrent block of the Cr color component.

FIGS. 16 and 17 are diagrams schematically illustrating an example of avideo/image decoding method and related components according toembodiment(s) of the present disclosure. The method disclosed in FIG. 16may be performed by the decoding apparatus illustrated in FIG. 3 or 17.Specifically, for example, S1600 of FIG. 16 may be performed by theentropy decoder 310 of the decoding apparatus, S1610 may be performed bythe adder 340 of the encoding apparatus, and S1620 and S1630 may beperformed by the filter 350 of the encoding apparatus.

Referring to FIG. 16, the decoding apparatus may receive/obtain thevideo/image information (S1600). The video/image information may includethe prediction-related information and/or the residual information. Thedecoding apparatus may receive/obtain the image/video informationthrough the bitstream. The residual information may be generated throughvarious encoding methods such as exponential Golomb, CAVLC, and CABAC.In an example, the video/image information may further include theCCAL-related information. For example, the CCALF-related information mayinclude a CCALF enable flag, a flag related to whether the CCALF isenabled for the Cb (or Cr) color component, a Cb (or Cr) filter signalflag related to whether the cross-component filters for the Cb (or Cr)color component are signaled, information related to the number ofcross-component filters for the Cb (or Cr) color component, informationon the absolute values of the cross-component filter coefficients forthe Cb (or Cr) color component, information on the signs of thecross-component filter coefficients for the Cb (or Cr) color component,and/or information on whether the cross-component filter is applied tothe current block of the Cb (or Cr) color component in the information(coding tree unit syntax) on the coding tree unit.

The image/video information may include various information according tothe embodiment of the present disclosure. For example, the image/videoinformation may include information disclosed in at least one of Tables1 to 28 described above.

The decoding apparatus may derive the transform coefficients.Specifically, the decoding apparatus may derive the quantized transformcoefficients based on the residual information. The quantized transformcoefficients may have a one-dimensional vector form based on acoefficient scan order. The decoding apparatus may derive the transformcoefficients based on the dequantization process for the quantizedtransform coefficients.

The decoding apparatus may derive the residual samples. The decodingapparatus may derive the residual samples based on the transformcoefficients. In addition, the residual samples for the current blockmay be derived based on the original samples and the prediction samplesof the current block.

The decoding apparatus may perform prediction based on the image/videoinformation and derive the prediction samples of the current block. Thedecoding apparatus may derive the prediction samples of the currentblock based on the prediction mode information. The decoding apparatusmay determine whether the inter prediction or intra prediction isapplied to the current block based on the prediction mode information,and may perform prediction based thereon.

The decoding apparatus may generate/derive the reconstructed lumasamples and/or the reconstructed chroma samples (S1610). The decodingapparatus may generate/derive the reconstructed luma samples and/or thereconstructed chroma samples based on the image information. Thedecoding apparatus may generate the reconstructed luma (or chroma)samples from the above-described image information-based residualsamples. The luma component of the reconstructed samples may correspondto the reconstructed luma samples, and the chroma component of thereconstructed samples may correspond to the reconstructed chromasamples.

The decoding apparatus may perform the adaptive loop filtering (ALF)process on the reconstructed chroma samples to generate the filteredreconstructed chroma samples (S1620). In the ALF process, the decodingapparatus may derive the ALF filter coefficients for the ALF process ofthe reconstructed chroma samples. In addition, the decoding apparatusmay derive the ALF filter coefficients for the ALF process of thereconstructed chroma samples. The ALF filter coefficients may be derivedbased on the ALF parameters included in the ALF data in the APS.

The decoding apparatus may generate the filtered reconstructed chromasamples. The decoding apparatus may generate the filtered reconstructedsamples based on the reconstructed chroma samples and the ALF filtercoefficients.

The decoding apparatus may perform the cross-component filtering processon the filtered reconstructed chroma samples to generate the modifiedfiltered reconstructed chroma samples (S1630). In the cross-componentfiltering process, the decoding apparatus may derive the cross-componentfilter coefficients for the cross-component filtering. Thecross-component filter coefficients may be derived based on theCCALF-related information in the ALF data included in theabove-described APS, and the identifier (ID) information of thecorresponding APS may be included in (may be signaled through) the sliceheader.

The decoding apparatus may generate the modified filtered reconstructedchroma samples. The decoding apparatus may generate the modifiedfiltered reconstructed chroma samples based on the reconstructed lumasamples, the filtered reconstructed chroma samples, and thecross-component filter coefficients. In an example, the decodingapparatus may derive a difference between two of the reconstructed lumasamples, and multiply the difference by a filter coefficient of one ofthe cross-component filter coefficients. Based on the result of themultiplication and the filtered reconstructed chroma samples, thedecoding apparatus may generate the modified filtered reconstructedchroma samples. For example, the decoding apparatus may generate themodified filtered reconstructed chroma samples based on a sum betweenthe multiplication and one of the filtered reconstructed chroma samples.

In an embodiment, the image information may include the adaptationparameter set (APS) including the ALF data including the information onthe cross-component filtering. The ALF data may include information onthe number of cross-component filters for the cross-component filteringand information on the cross-component filter coefficients. The modifiedfiltered reconstructed chroma samples may be generated based on thefiltered reconstructed chroma samples and the cross-component filtercoefficients.

In an embodiment, the cross-component filters may includecross-component filters for the Cb color component and cross-componentfilters for the Cr color component. The image information may include afirst adaptation parameter set (APS) including first ALF data and asecond APS including second ALF data. The first ALF data may includeinformation on the number of cross-component filters for the Cb colorcomponent. The second ALF data may include information on the number ofcross-component filters for the Cr color component.

In an embodiment, the image information may include the headerinformation and the adaptation parameter set (APS). The headerinformation may be slice header information. The slice headerinformation may include information related to an identifier of an APSincluding ALF data. For example, the cross-component filter coefficientsmay be derived based on the ALF data.

In an embodiment, the image information may include a sequence parameterset (SPS). The SPS may include a cross-component adaptive loop filter(CCALF) enable flag related to whether the cross-component filtering isenabled. For example, based on the CC-ALF enable flag, ID information ofadaptation parameter sets (APSs) including the ALF data used for thederivation of the cross-component filter coefficients for the CC-ALF maybe derived.

In an embodiment, the image information may include general constraintinformation. For example, the general constraint information may includea CCALF constraint flag for constraining the cross-component filteringbased on the value of the CCALF enable flag included in the SPS. Whenthe value of the CCALF constraint flag is 0, the CCALF constraint maynot be applied. The CCALF constraint flag having a value of 1 mayindicate that the value of the CCALF enable flag included in the SPS is0.

In an embodiment, the slice header information may include a first flagrelated to whether the CCALF is enabled for the Cb color component ofthe filtered reconstructed chroma samples, and a second flag related towhether the CCALF is enabled for the Cr color component of the filteredreconstructed chroma samples.

In an embodiment, the image information may include the adaptationparameter sets (APSs). In an example, based on the determination thatthe value of the first flag is 1, the slice header information mayinclude ID information of a first APS including first ALF data used forthe derivation of the cross-component filter coefficients for the Cbcolor component. In an example, based on the determination that thevalue of the first flag is 1, the slice header information may includeID information of a second APS including second ALF data used for thederivation of the cross-component filter coefficients for the Cr colorcomponent.

In an embodiment, the first ALF data may include a Cb filter signal flagrelated to whether the cross-component filters for the Cb colorcomponent are signaled. Based on the Cb filter signal flag, the firstALF data may include information related to the number ofcross-component filters for the Cb color component. Based on theinformation related to the number of cross-component filters for the Cbcolor component, the first ALF data may include the information on theabsolute values of the cross-component filter coefficients for the Cbcolor component and the information on the signs of the cross-componentfilter coefficients for the Cb color component. Based on the informationon the absolute values of the cross-component filter coefficients forthe Cb color component and the information on the signs of thecross-component filter coefficients for the Cb color component, thecross-component filter coefficients for the Cb color component may bederived.

In an embodiment, the information related to the number ofcross-component filters for the Cb color component may be zero-orderexponential Golomb (0^(th) EG) coded.

In an embodiment, the second ALF data may include a Cr filter signalflag related to whether the cross-component filters for the Cr colorcomponent are signaled. Based on the Cr filter signal flag, the secondALF data may include information related to the number ofcross-component filters for the Cr color component. Based on theinformation related to the number of cross-component filters for the Crcolor component, the second ALF data may include the information on theabsolute values of the cross-component filter coefficients for the Crcolor component and the information on the signs of the cross-componentfilter coefficients for the Cr color component. Based on the informationon the absolute values of the cross-component filter coefficients forthe Cr color component and the information on the signs of thecross-component filter coefficients for the Cr color component, thecross-component filter coefficients for the Cr color component may bederived.

In an embodiment, the information related to the number ofcross-component filters for the Cr color component may be zero-orderexponential Golomb (0^(th) EG) coded.

In an embodiment, the image information may include the information onthe coding tree unit. The information on the coding tree unit mayinclude the information on whether the cross-component filter is appliedto the current block of the Cb color component and/or the informationrelated to whether the cross-component filter is applied to the currentblock of the Cr color component.

In an embodiment, the information on the coding tree unit may includeinformation on a filter set index of the cross-component filter appliedto the current block of the Cb color component, and/or the informationon the filter set index of the cross-component filter applied to thecurrent block of the Cr color component.

When the residual sample for the current block exists, the decodingapparatus may receive the information on the residual for the currentblock. The information on the residual may include the transformcoefficients on the residual samples. The decoding apparatus may derivethe residual samples (or residual sample array) for the current blockbased on the residual information. Specifically, the decoding apparatusmay derive the quantized transform coefficients based on the residualinformation. The quantized transform coefficients may have aone-dimensional vector form based on a coefficient scan order. Thedecoding apparatus may derive the transform coefficients based on thedequantization process for the quantized transform coefficients. Thedecoding apparatus may derive the residual samples based on thetransform coefficients.

The decoding apparatus may generate a reconstructed samples based on the(intra) prediction samples and residual samples, and may derive thereconstructed block or the reconstructed picture based on thereconstructed samples. Specifically, the decoding apparatus may generatereconstructed samples based on a sum between the (intra) predictionsamples and the residual samples. Thereafter, as described above, thedecoding apparatus may apply an in-loop filtering process such asdeblocking filtering and/or SAO process to the reconstructed picture inorder to improve the subjective/objective picture quality, if necessary.

For example, the decoding apparatus may obtain image informationincluding all or parts of the above-described pieces of information (orsyntax elements) by decoding the bitstream or the encoded information.Further, the bitstream or the encoded information may be stored in acomputer readable storage medium, and may cause the above-describeddecoding method to be performed.

Although methods have been described on the basis of a flowchart inwhich steps or blocks are listed in sequence in the above-describedembodiments, the steps of the present document are not limited to acertain order, and a certain step may be performed in a different stepor in a different order or concurrently with respect to that describedabove. Further, it will be understood by those ordinary skilled in theart that the steps of the flowcharts are not exclusive, and another stepmay be included therein or one or more steps in the flowchart may bedeleted without exerting an influence on the scope of the presentdisclosure.

The aforementioned method according to the present disclosure may be inthe form of software, and the encoding apparatus and/or decodingapparatus according to the present disclosure may be included in adevice for performing image processing, for example, a TV, a computer, asmart phone, a set-top box, a display device, or the like.

When the embodiments of the present disclosure are implemented bysoftware, the aforementioned method may be implemented by a module(process or function) which performs the aforementioned function. Themodule may be stored in a memory and executed by a processor. The memorymay be installed inside or outside the processor and may be connected tothe processor via various well-known means. The processor may includeApplication-Specific Integrated Circuit (ASIC), other chipsets, alogical circuit, and/or a data processing device. The memory may includea Read-Only Memory (ROM), a Random Access Memory (RAM), a flash memory,a memory card, a storage medium, and/or other storage device. In otherwords, the embodiments according to the present disclosure may beimplemented and executed on a processor, a micro-processor, acontroller, or a chip. For example, functional units illustrated in therespective figures may be implemented and executed on a computer, aprocessor, a microprocessor, a controller, or a chip. In this case,information on implementation (for example, information on instructions)or algorithms may be stored in a digital storage medium.

In addition, the decoding apparatus and the encoding apparatus to whichthe embodiment(s) of the present document is applied may be included ina multimedia broadcasting transceiver, a mobile communication terminal,a home cinema video device, a digital cinema video device, asurveillance camera, a video chat device, and a real time communicationdevice such as video communication, a mobile streaming device, a storagemedium, a camcorder, a video on demand (VoD) service provider, an OverThe Top (OTT) video device, an internet streaming service provider, a 3Dvideo device, a Virtual Reality (VR) device, an Augment Reality (AR)device, an image telephone video device, a vehicle terminal (forexample, a vehicle (including an autonomous vehicle) terminal, anairplane terminal, or a ship terminal), and a medical video device; andmay be used to process an image signal or data. For example, the OTTvideo device may include a game console, a Bluray player, anInternet-connected TV, a home theater system, a smartphone, a tablet PC,and a Digital Video Recorder (DVR).

In addition, the processing method to which the embodiment(s) of thepresent document is applied may be produced in the form of a programexecuted by a computer and may be stored in a computer-readablerecording medium. Multimedia data having a data structure according tothe embodiment(s) of the present document may also be stored in thecomputer-readable recording medium. The computer readable recordingmedium includes all kinds of storage devices and distributed storagedevices in which computer readable data is stored. The computer-readablerecording medium may include, for example, a Bluray disc (BD), auniversal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, aCD-ROM, a magnetic tape, a floppy disk, and an optical data storagedevice. The computer-readable recording medium also includes mediaembodied in the form of a carrier wave (for example, transmission overthe Internet). In addition, a bitstream generated by the encoding methodmay be stored in the computer-readable recording medium or transmittedthrough a wired or wireless communication network.

In addition, the embodiment(s) of the present document may be embodiedas a computer program product based on a program code, and the programcode may be executed on a computer according to the embodiment(s) of thepresent document. The program code may be stored on a computer-readablecarrier.

FIG. 18 represents an example of a contents streaming system to whichthe embodiment of the present document may be applied.

Referring to FIG. 18, the content streaming system to which theembodiments of the present document is applied may generally include anencoding server, a streaming server, a web server, a media storage, auser device, and a multimedia input device.

The encoding server functions to compress to digital data the contentsinput from the multimedia input devices, such as the smart phone, thecamera, the camcorder and the like, to generate a bitstream, and totransmit it to the streaming server. As another example, in a case wherethe multimedia input device, such as, the smart phone, the camera, thecamcorder or the like, directly generates a bitstream, the encodingserver may be omitted.

The bitstream may be generated by an encoding method or a bitstreamgeneration method to which the embodiments of the present document isapplied. And the streaming server may temporarily store the bitstream ina process of transmitting or receiving the bitstream.

The streaming server transmits multimedia data to the user equipment onthe basis of a user's request through the web server, which functions asan instrument that informs a user of what service there is. When theuser requests a service which the user wants, the web server transfersthe request to the streaming server, and the streaming server transmitsmultimedia data to the user. In this regard, the contents streamingsystem may include a separate control server, and in this case, thecontrol server functions to control commands/responses betweenrespective equipment in the content streaming system.

The streaming server may receive contents from the media storage and/orthe encoding server. For example, in a case the contents are receivedfrom the encoding server, the contents may be received in real time. Inthis case, the streaming server may store the bitstream for apredetermined period of time to provide the streaming service smoothly.

For example, the user equipment may include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personaldigital assistant (PDA), a portable multimedia player (PMP), anavigation, a slate PC, a tablet PC, an ultrabook, a wearable device(e.g., a watch-type terminal (smart watch), a glass-type terminal (smartglass), a head mounted display (HMD)), a digital TV, a desktop computer,a digital signage or the like.

Each of servers in the contents streaming system may be operated as adistributed server, and in this case, data received by each server maybe processed in distributed manner.

Claims in the present description can be combined in a various way. Forexample, technical features in method claims of the present descriptioncan be combined to be implemented or performed in an apparatus, andtechnical features in apparatus claims can be combined to be implementedor performed in a method. Further, technical features in method claim(s)and apparatus claim(s) can be combined to be implemented or performed inan apparatus. Further, technical features in method claim(s) andapparatus claim(s) can be combined to be implemented or performed in amethod.

What is claimed is:
 1. An image decoding method performed by a decodingapparatus, the image decoding method comprising: receiving imageinformation through a bitstream; generating reconstructed luma samplesand reconstructed chroma samples based on the image information;performing an adaptive loop filtering (ALF) process on the reconstructedchroma samples to generate filtered reconstructed chroma samples; andperforming a cross-component filtering process on the filteredreconstructed chroma samples to generate modified filtered reconstructedchroma samples, wherein the image information includes an adaptationparameter set (APS) including ALF data including information oncross-component filtering, wherein the ALF data includes information onthe number of cross-component filters for cross-component filtering andinformation on the cross-component filter coefficients, and wherein themodified filtered reconstructed chroma samples are generated based onthe filtered reconstructed chroma samples and the cross-component filtercoefficients.
 2. The image decoding method of claim 1, wherein: thecross-component filters include cross-component filters for a Cb colorcomponent and cross-component filters for a Cr color component, theimage information includes a first APS including first ALF data and asecond APS including second ALF data, the first ALF data includesinformation on the number of cross-component filters for the Cb colorcomponent, and the second ALF data includes information on the number ofcross-component filters for the Cr color component.
 3. The imagedecoding method of claim 2, wherein: based on the information on thenumber of cross-component filters for the Cb color component, the firstALF data includes information on absolute values of the cross-componentfilter coefficients for the Cb color component and information on signsof the cross-component filter coefficients for the Cb color component,and based on the information on the absolute values of thecross-component filter coefficients for the Cb color component and theinformation on the signs of the cross-component filter coefficients forthe Cb color component, the cross-component filter coefficients for theCb color component are derived.
 4. The image decoding method of claim 1,wherein: the image information includes information on a coding treeunit, and the information on the coding tree unit includes: informationon whether a cross-component filter is applied to the current block of aCb color component; and information on whether a cross-component filteris applied to the current block of a Cr color component.
 5. The imagedecoding method of claim 1, wherein: the image information includesinformation on a coding tree unit, and the information on the codingtree unit includes: information on a filter set index of across-component filter that is applied to the current block of a Cbcolor component; and information on a filter set index of across-component filter that is applied to the current block of a Crcolor component.
 6. The image decoding method of claim 1, wherein: theimage information includes a sequence parameter set (SPS), and the SPSincludes a cross-component adaptive loop filter (CCALF) enable flagrelated to whether the cross-component filtering is enabled.
 7. Theimage decoding method of claim 6, wherein: the image informationincludes general constraint information, and the general constraintinformation includes a CCALF constraint flag for constraining thecross-component filtering based on the value of the CCALF enable flag.8. The image decoding method of claim 6, wherein: based on thedetermination that the CCALF enable flag is 1, the ID information of theAPS is derived.
 9. An image encoding method performed by an encodingapparatus, the image encoding method comprising: generatingreconstructed luma samples and reconstructed chroma samples of a currentblock in a current picture; deriving ALF filter coefficients for anadaptive loop filtering (ALF) process; generating ALF-relatedinformation based on the ALF filter coefficients; derivingcross-component filters and cross-component filter coefficients for across-component filtering process; generating cross-componentfiltering-related information based on the cross-component filters andthe cross-component filter coefficients; and encoding image informationincluding information for generating the reconstructed samples, theALF-related information, and the cross-component filtering-relatedinformation, wherein the cross-component filtering-related informationincludes information on the number of cross-component filters andinformation on cross-component filter coefficients.
 10. The imageencoding method of claim 9, wherein: the cross-component filters includecross-component filters for a Cb color component and cross-componentfilters for a Cr color component, the image information includes a firstadaptation parameter set (APS) including first ALF data and a second APSincluding second ALF data, the first ALF data includes information onthe number of cross-component filters for the Cb color component, andthe second ALF data includes information on the number ofcross-component filters for the Cr color component.
 11. The imageencoding method of claim 9, wherein: the image information includesinformation on a coding tree unit, and the information on the codingtree unit includes: information on whether a cross-component filter isapplied to the current block of a Cb color component; and information onwhether a cross-component filter is applied to the current block of a Crcolor component.
 12. The image encoding method of claim 9, wherein: theimage information includes information on a coding tree unit, and theinformation on the coding tree unit includes: information on a filterset index of a cross-component filter that is applied to the currentblock of a Cb color component; and information on a filter set index ofa cross-component filter that is applied to the current block of a Crcolor component.
 13. The image encoding method of claim 9, wherein: theimage information includes a sequence parameter set (SPS), and the SPSincludes a cross-component adaptive loop filter (CCALF) enable flagrelated to whether the cross-component filtering is enabled.
 14. Theimage encoding method of claim 13, wherein: the image informationincludes general constraint information, and the general constraintinformation includes a CCALF constraint flag for constraining thecross-component filtering based on the value of the CCALF enable flag15. The image encoding method of claim 13, wherein: based on adetermination that the CCALF enable flag is 1, ID information ofadaptation parameter sets (APSs) including ALF data used for derivingthe cross-component filter coefficients is derived.
 16. A non-transitorycomputer-readable storage medium storing a bitstream generated by animage encoding method, the method comprising: generating reconstructedluma samples and reconstructed chroma samples of a current block in acurrent picture; deriving ALF filter coefficients for an adaptive loopfiltering (ALF) process; generating ALF-related information based on theALF filter coefficients; deriving cross-component filters andcross-component filter coefficients for a cross-component filteringprocess; generating cross-component filtering-related information basedon the cross-component filters and the cross-component filtercoefficients; and encoding image information to generate the bitstream,wherein the image information includes information for generating thereconstructed samples, the ALF-related information, and thecross-component filtering-related information, wherein thecross-component filtering-related information includes information onthe number of cross-component filters and information on cross-componentfilter coefficients.